diff options
Diffstat (limited to 'src/backend/tcop')
-rw-r--r-- | src/backend/tcop/dest.c | 16 | ||||
-rw-r--r-- | src/backend/tcop/fastpath.c | 13 | ||||
-rw-r--r-- | src/backend/tcop/postgres.c | 39 | ||||
-rw-r--r-- | src/backend/tcop/pquery.c | 6 | ||||
-rw-r--r-- | src/backend/tcop/utility.c | 8 |
5 files changed, 34 insertions, 48 deletions
diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c index 0e9cdd22137..61b1b55821c 100644 --- a/src/backend/tcop/dest.c +++ b/src/backend/tcop/dest.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.44 2001/03/22 06:16:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.45 2001/10/25 05:49:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -173,7 +173,7 @@ DestToFunction(CommandDest dest) { switch (dest) { - case Remote: + case Remote: return printtup_create_DR(false); case RemoteInternal: @@ -272,13 +272,13 @@ NullCommand(CommandDest dest) { switch (dest) { - case RemoteInternal: - case Remote: + case RemoteInternal: + case Remote: /* * tell the fe that we saw an empty query string */ - pq_putbytes("I", 2);/* note we send I and \0 */ + pq_putbytes("I", 2); /* note we send I and \0 */ break; case Debug: @@ -303,8 +303,8 @@ ReadyForQuery(CommandDest dest) { switch (dest) { - case RemoteInternal: - case Remote: + case RemoteInternal: + case Remote: if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2) pq_putbytes("Z", 1); /* Flush output at end of cycle in any case. */ @@ -323,7 +323,7 @@ UpdateCommandInfo(int operation, Oid lastoid, uint32 tuples) { switch (operation) { - case CMD_INSERT: + case CMD_INSERT: if (tuples > 1) lastoid = InvalidOid; sprintf(CommandInfo, " %u %u", lastoid, tuples); diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index ccb36b20c11..c710d2c3d43 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.49 2001/06/01 15:45:42 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.50 2001/10/25 05:49:43 momjian Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -120,8 +120,8 @@ SendFunctionResult(Datum retval,/* actual return value */ * each fastpath call as a separate transaction command, and so the * cached data could never actually have been reused. If it had worked * as intended, it would have had problems anyway with dangling references - * in the FmgrInfo struct. So, forget about caching and just repeat the - * syscache fetches on each usage. They're not *that* expensive. + * in the FmgrInfo struct. So, forget about caching and just repeat the + * syscache fetches on each usage. They're not *that* expensive. */ struct fp_info { @@ -157,7 +157,8 @@ fetch_fp_info(Oid func_id, struct fp_info * fip) * correct value until we are about to return with a good struct * fp_info, since we can be interrupted (i.e., with an elog(ERROR, * ...)) at any time. [No longer really an issue since we don't save - * the struct fp_info across transactions anymore, but keep it anyway.] + * the struct fp_info across transactions anymore, but keep it + * anyway.] */ MemSet((char *) fip, 0, sizeof(struct fp_info)); fip->funcid = InvalidOid; @@ -260,8 +261,8 @@ HandleFunctionRequest(void) return EOF; /* - * There used to be a lame attempt at caching lookup info here. - * Now we just do the lookups on every call. + * There used to be a lame attempt at caching lookup info here. Now we + * just do the lookups on every call. */ fip = &my_fp; fetch_fp_info(fid, fip); diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index ce7ccb2af5c..e839e47f1c3 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.238 2001/10/21 03:25:35 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.239 2001/10/25 05:49:43 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -72,7 +72,7 @@ extern int optind; extern char *optarg; -char *debug_query_string; /* used by pgmonitor */ +char *debug_query_string; /* used by pgmonitor */ /* Note: whereToSendOutput is initialized for the bootstrap/standalone case */ CommandDest whereToSendOutput = Debug; @@ -99,7 +99,6 @@ int UseNewLine = 1; /* Use newlines query delimiters (the #else int UseNewLine = 0; /* Use EOF as query delimiters */ - #endif /* TCOP_DONTUSENEWLINE */ /* @@ -163,7 +162,6 @@ InteractiveBackend(StringInfo inBuf) { if (UseNewLine) { - /* * if we are using \n as a delimiter, then read characters * until the \n. @@ -199,7 +197,6 @@ InteractiveBackend(StringInfo inBuf) } else { - /* * otherwise read characters until EOF. */ @@ -258,7 +255,6 @@ SocketBackend(StringInfo inBuf) switch (qtype) { - /* * 'Q': user entered a query */ @@ -686,7 +682,6 @@ pg_exec_query_string(char *query_string, /* string to execute */ if (!allowit) { - /* * the EndCommand() stuff is to tell the frontend that the * command ended. -cim 6/1/90 @@ -755,7 +750,6 @@ pg_exec_query_string(char *query_string, /* string to execute */ if (querytree->commandType == CMD_UTILITY) { - /* * process utility functions (create, destroy, etc..) */ @@ -768,7 +762,6 @@ pg_exec_query_string(char *query_string, /* string to execute */ } else { - /* * process a plannable query. */ @@ -848,7 +841,7 @@ pg_exec_query_string(char *query_string, /* string to execute */ if (xact_started) finish_xact_command(); - debug_query_string = NULL; /* used by pgmonitor */ + debug_query_string = NULL; /* used by pgmonitor */ } /* @@ -901,7 +894,7 @@ quickdie(SIGNAL_ARGS) "\n\tThe Postmaster has informed me that some other backend" "\n\tdied abnormally and possibly corrupted shared memory." "\n\tI have rolled back the current transaction and am" - "\n\tgoing to terminate your database system connection and exit." + "\n\tgoing to terminate your database system connection and exit." "\n\tPlease reconnect to the database system and repeat your query."); /* @@ -1111,7 +1104,7 @@ PostgresMain(int argc, char *argv[], const char *username) bool secure; int errs = 0; GucContext ctx; - char *tmp; + char *tmp; int firstchar; StringInfo parser_input; @@ -1482,9 +1475,9 @@ PostgresMain(int argc, char *argv[], const char *username) if (!potential_DataDir) { fprintf(stderr, "%s does not know where to find the database system " - "data. You must specify the directory that contains the " - "database system either by specifying the -D invocation " - "option or by setting the PGDATA environment variable.\n\n", + "data. You must specify the directory that contains the " + "database system either by specifying the -D invocation " + "option or by setting the PGDATA environment variable.\n\n", argv[0]); proc_exit(1); } @@ -1509,7 +1502,7 @@ PostgresMain(int argc, char *argv[], const char *username) pqsignal(SIGHUP, SigHupHandler); /* set flag to read config file */ pqsignal(SIGINT, QueryCancelHandler); /* cancel current query */ pqsignal(SIGTERM, die); /* cancel current query and exit */ - pqsignal(SIGQUIT, quickdie);/* hard crash time */ + pqsignal(SIGQUIT, quickdie); /* hard crash time */ pqsignal(SIGALRM, HandleDeadLock); /* check for deadlock after * timeout */ @@ -1529,7 +1522,8 @@ PostgresMain(int argc, char *argv[], const char *username) * Reset some signals that are accepted by postmaster but not by * backend */ - pqsignal(SIGCHLD, SIG_DFL); /* system() requires this on some platforms */ + pqsignal(SIGCHLD, SIG_DFL); /* system() requires this on some + * platforms */ pqsignal(SIGTTIN, SIG_DFL); pqsignal(SIGTTOU, SIG_DFL); pqsignal(SIGCONT, SIG_DFL); @@ -1586,8 +1580,8 @@ PostgresMain(int argc, char *argv[], const char *username) argv[0]); /* - * Validate we have been given a reasonable-looking DataDir - * (if under postmaster, assume postmaster did this already). + * Validate we have been given a reasonable-looking DataDir (if + * under postmaster, assume postmaster did this already). */ ValidatePgVersion(DataDir); @@ -1648,7 +1642,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.238 $ $Date: 2001/10/21 03:25:35 $\n"); + puts("$Revision: 1.239 $ $Date: 2001/10/25 05:49:43 $\n"); } /* @@ -1740,7 +1734,6 @@ PostgresMain(int argc, char *argv[], const char *username) for (;;) { - /* * Release storage left over from prior query cycle, and create a * new query input buffer in the cleared QueryContext. @@ -1819,7 +1812,6 @@ PostgresMain(int argc, char *argv[], const char *username) */ switch (firstchar) { - /* * 'F' indicates a fastpath call. */ @@ -1849,7 +1841,6 @@ PostgresMain(int argc, char *argv[], const char *username) case 'Q': if (strspn(parser_input->data, " \t\r\n") == parser_input->len) { - /* * if there is nothing in the input buffer, don't * bother trying to parse and execute anything; just @@ -1860,7 +1851,6 @@ PostgresMain(int argc, char *argv[], const char *username) } else { - /* * otherwise, process the input string. * @@ -2058,6 +2048,5 @@ assertTest(int val) return val; } - #endif #endif diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index c7a33a3bc29..91d98a2d50d 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.45 2001/10/05 17:28:12 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.46 2001/10/25 05:49:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -30,7 +30,7 @@ static char *CreateOperationTag(int operationType); * CreateQueryDesc * ---------------------------------------------------------------- */ -QueryDesc * +QueryDesc * CreateQueryDesc(Query *parsetree, Plan *plantree, CommandDest dest) @@ -140,7 +140,6 @@ PreparePortal(char *portalName) portal = GetPortalByName(portalName); if (PortalIsValid(portal)) { - /* * XXX Should we raise an error rather than closing the old * portal? @@ -197,7 +196,6 @@ ProcessQuery(Query *parsetree, intoName = parsetree->into; if (parsetree->isBinary) { - /* * For internal format portals, we change Remote * (externalized form) to RemoteInternal (internalized diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 66ccb652784..7142f0e60f6 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.121 2001/10/18 17:30:15 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.122 2001/10/25 05:49:43 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -144,7 +144,6 @@ ProcessUtility(Node *parsetree, switch (nodeTag(parsetree)) { - /* * ******************************** transactions ******************************** * @@ -386,7 +385,6 @@ ProcessUtility(Node *parsetree, */ if (stmt->column == NULL) { - /* * rename relation * @@ -398,7 +396,6 @@ ProcessUtility(Node *parsetree, } else { - /* * rename attribute */ @@ -476,7 +473,8 @@ ProcessUtility(Node *parsetree, case T_GrantStmt: { - GrantStmt *stmt = (GrantStmt *) parsetree; + GrantStmt *stmt = (GrantStmt *) parsetree; + commandTag = stmt->is_grant ? "GRANT" : "REVOKE"; set_ps_display(commandTag); |