diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2005-11-03 17:11:40 +0000 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2005-11-03 17:11:40 +0000 |
commit | 902377c465031947d747bb2e3912b22a92329b7f (patch) | |
tree | 6586e15af12609b6135275d06d2339adc669a94e /src/backend/tcop/postgres.c | |
parent | 76c9ac8ebbba391c3062bf10cc6d8b187746b6eb (diff) | |
download | postgresql-902377c465031947d747bb2e3912b22a92329b7f.tar.gz postgresql-902377c465031947d747bb2e3912b22a92329b7f.zip |
Rename the members of CommandDest enum so they don't collide with other uses of
those names. (Debug and None were pretty bad names anyway.) I hope I catched
all uses of the names in comments too.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 77a85f27e4f..7b635a0aeac 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.467 2005/10/20 20:05:45 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.468 2005/11/03 17:11:38 alvherre Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -74,7 +74,7 @@ extern char *optarg; const char *debug_query_string; /* for pgmonitor and log_min_error_statement */ /* Note: whereToSendOutput is initialized for the bootstrap/standalone case */ -CommandDest whereToSendOutput = Debug; +CommandDest whereToSendOutput = DestDebug; /* flag for logging end of session */ bool Log_disconnections = false; @@ -404,7 +404,7 @@ ReadCommand(StringInfo inBuf) { int result; - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) result = SocketBackend(inBuf); else result = InteractiveBackend(inBuf); @@ -1364,7 +1364,7 @@ exec_parse_message(const char *query_string, /* string to execute */ /* * Send ParseComplete. */ - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) pq_putemptymessage('1'); if (save_log_statement_stats) @@ -1650,7 +1650,7 @@ exec_bind_message(StringInfo input_message) /* * Send BindComplete. */ - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) pq_putemptymessage('2'); } @@ -1678,8 +1678,8 @@ exec_execute_message(const char *portal_name, long max_rows) /* Adjust destination to tell printtup.c what to do */ dest = whereToSendOutput; - if (dest == Remote) - dest = RemoteExecute; + if (dest == DestRemote) + dest = DestRemoteExecute; portal = GetPortalByName(portal_name); if (!PortalIsValid(portal)) @@ -1835,7 +1835,7 @@ exec_execute_message(const char *portal_name, long max_rows) else { /* Portal run not complete, so send PortalSuspended */ - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) pq_putemptymessage('s'); } @@ -1913,7 +1913,7 @@ exec_describe_statement_message(const char *stmt_name) errmsg("unnamed prepared statement does not exist"))); } - if (whereToSendOutput != Remote) + if (whereToSendOutput != DestRemote) return; /* can't actually do anything... */ /* @@ -1959,7 +1959,7 @@ exec_describe_portal_message(const char *portal_name) (errcode(ERRCODE_UNDEFINED_CURSOR), errmsg("portal \"%s\" does not exist", portal_name))); - if (whereToSendOutput != Remote) + if (whereToSendOutput != DestRemote) return; /* can't actually do anything... */ if (portal->tupDesc) @@ -2938,7 +2938,7 @@ PostgresMain(int argc, char *argv[], const char *username) /* * Send this backend's cancellation info to the frontend. */ - if (whereToSendOutput == Remote && + if (whereToSendOutput == DestRemote && PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2) { StringInfoData buf; @@ -2951,7 +2951,7 @@ PostgresMain(int argc, char *argv[], const char *username) } /* Welcome banner for standalone case */ - if (whereToSendOutput == Debug) + if (whereToSendOutput == DestDebug) printf("\nPostgreSQL stand-alone backend %s\n", PG_VERSION); /* @@ -3239,8 +3239,8 @@ PostgresMain(int argc, char *argv[], const char *username) * Reset whereToSendOutput to prevent ereport from * attempting to send any more messages to client. */ - if (whereToSendOutput == Remote) - whereToSendOutput = None; + if (whereToSendOutput == DestRemote) + whereToSendOutput = DestNone; proc_exit(0); } @@ -3294,7 +3294,7 @@ PostgresMain(int argc, char *argv[], const char *username) break; } - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) pq_putemptymessage('3'); /* CloseComplete */ } break; @@ -3328,7 +3328,7 @@ PostgresMain(int argc, char *argv[], const char *username) case 'H': /* flush */ pq_getmsgend(&input_message); - if (whereToSendOutput == Remote) + if (whereToSendOutput == DestRemote) pq_flush(); break; @@ -3350,8 +3350,8 @@ PostgresMain(int argc, char *argv[], const char *username) * Reset whereToSendOutput to prevent ereport from attempting * to send any more messages to client. */ - if (whereToSendOutput == Remote) - whereToSendOutput = None; + if (whereToSendOutput == DestRemote) + whereToSendOutput = DestNone; /* * NOTE: if you are tempted to add more code here, DON'T! |