diff options
| author | Bruce Momjian | 2005-11-22 18:17:34 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2005-11-22 18:17:34 +0000 |
| commit | 436a2956d80db29ac1dff640b631620d856b4f70 (patch) | |
| tree | db2252048385dd23a7d7a196e8685cb0a5816f7a /src/backend/tcop | |
| parent | e196eedd8a95380fb392c00b9e7ea88a0e46053e (diff) | |
Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory. Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).
Backpatch to 8.1.X.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/fastpath.c | 8 | ||||
| -rw-r--r-- | src/backend/tcop/postgres.c | 80 | ||||
| -rw-r--r-- | src/backend/tcop/pquery.c | 26 | ||||
| -rw-r--r-- | src/backend/tcop/utility.c | 10 |
4 files changed, 62 insertions, 62 deletions
diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 7c7de52e57a..a7f0f7f8912 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.83 2005/10/15 02:49:26 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.84 2005/11/22 18:17:21 momjian Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -542,9 +542,9 @@ parse_fcall_arguments_20(StringInfo msgBuf, struct fp_info * fip, * Copy supplied arguments into arg vector. In protocol 2.0 these are * always assumed to be supplied in binary format. * - * Note: although the original protocol 2.0 code did not have any way for the - * frontend to specify a NULL argument, we now choose to interpret length - * == -1 as meaning a NULL. + * Note: although the original protocol 2.0 code did not have any way for + * the frontend to specify a NULL argument, we now choose to interpret + * length == -1 as meaning a NULL. */ for (i = 0; i < nargs; ++i) { diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 277aa653157..3774c094b7b 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.469 2005/11/10 00:31:34 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.470 2005/11/22 18:17:21 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -301,8 +301,8 @@ SocketBackend(StringInfo inBuf) * sync, better to say "command unknown" than to run out of memory because * we used garbage as a length word. * - * This also gives us a place to set the doing_extended_query_message flag as - * soon as possible. + * This also gives us a place to set the doing_extended_query_message flag + * as soon as possible. */ switch (qtype) { @@ -1423,11 +1423,11 @@ exec_bind_message(StringInfo input_message) /* * If we are in aborted transaction state, the only portals we can - * actually run are those containing COMMIT or ROLLBACK commands. - * We disallow binding anything else to avoid problems with infrastructure - * that expects to run inside a valid transaction. We also disallow - * binding any parameters, since we can't risk calling user-defined - * I/O functions. + * actually run are those containing COMMIT or ROLLBACK commands. We + * disallow binding anything else to avoid problems with infrastructure + * that expects to run inside a valid transaction. We also disallow + * binding any parameters, since we can't risk calling user-defined I/O + * functions. */ if (IsAbortedTransactionBlockState() && (!IsTransactionExitStmtList(pstmt->query_list) || @@ -1490,12 +1490,11 @@ exec_bind_message(StringInfo input_message) /* * Rather than copying data around, we just set up a phony - * StringInfo pointing to the correct portion of the - * message buffer. We assume we can scribble on the - * message buffer so as to maintain the convention that - * StringInfos have a trailing null. This is grotty but - * is a big win when dealing with very large parameter - * strings. + * StringInfo pointing to the correct portion of the message + * buffer. We assume we can scribble on the message buffer so + * as to maintain the convention that StringInfos have a + * trailing null. This is grotty but is a big win when + * dealing with very large parameter strings. */ pbuf.data = (char *) pvalue; pbuf.maxlen = plength + 1; @@ -1514,8 +1513,8 @@ exec_bind_message(StringInfo input_message) getTypeInputInfo(ptype, &typinput, &typioparam); /* - * We have to do encoding conversion before calling - * the typinput routine. + * We have to do encoding conversion before calling the + * typinput routine. */ pstring = pg_client_to_server(pbuf.data, plength); params[i].value = @@ -1546,9 +1545,9 @@ exec_bind_message(StringInfo input_message) /* Trouble if it didn't eat the whole buffer */ if (pbuf.cursor != pbuf.len) ereport(ERROR, - (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("incorrect binary data format in bind parameter %d", - i + 1))); + (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), + errmsg("incorrect binary data format in bind parameter %d", + i + 1))); } else { @@ -2259,9 +2258,10 @@ check_stack_depth(void) /* * Trouble? * - * The test on stack_base_ptr prevents us from erroring out if called during - * process setup or in a non-backend process. Logically it should be done - * first, but putting it here avoids wasting cycles during normal cases. + * The test on stack_base_ptr prevents us from erroring out if called + * during process setup or in a non-backend process. Logically it should + * be done first, but putting it here avoids wasting cycles during normal + * cases. */ if (stack_depth > max_stack_depth_bytes && stack_base_ptr != NULL) @@ -2582,9 +2582,9 @@ PostgresMain(int argc, char *argv[], const char *username) /* * ignore system indexes * - * As of PG 7.4 this is safe to allow from the client, since it - * only disables reading the system indexes, not writing them. - * Worst case consequence is slowness. + * As of PG 7.4 this is safe to allow from the client, since + * it only disables reading the system indexes, not writing + * them. Worst case consequence is slowness. */ IgnoreSystemIndexes(true); break; @@ -2627,8 +2627,8 @@ PostgresMain(int argc, char *argv[], const char *username) /* * s - report usage statistics (timings) after each query * - * Since log options are SUSET, we need to postpone unless still - * in secure context + * Since log options are SUSET, we need to postpone unless + * still in secure context */ if (ctx == PGC_BACKEND) PendingConfigOption("log_statement_stats", "true"); @@ -2767,9 +2767,9 @@ PostgresMain(int argc, char *argv[], const char *username) /* * Set up signal handlers and masks. * - * Note that postmaster blocked all signals before forking child process, so - * there is no race condition whereby we might receive a signal before we - * have set up the handler. + * Note that postmaster blocked all signals before forking child process, + * so there is no race condition whereby we might receive a signal before + * we have set up the handler. * * Also note: it's best not to use any signals that are SIG_IGNored in the * postmaster. If such a signal arrives before we are able to change the @@ -2887,9 +2887,9 @@ PostgresMain(int argc, char *argv[], const char *username) /* * General initialization. * - * NOTE: if you are tempted to add code in this vicinity, consider putting it - * inside InitPostgres() instead. In particular, anything that involves - * database access should be there, not here. + * NOTE: if you are tempted to add code in this vicinity, consider putting + * it inside InitPostgres() instead. In particular, anything that + * involves database access should be there, not here. */ ereport(DEBUG3, (errmsg_internal("InitPostgres"))); @@ -2978,13 +2978,13 @@ PostgresMain(int argc, char *argv[], const char *username) * If an exception is encountered, processing resumes here so we abort the * current transaction and start a new one. * - * You might wonder why this isn't coded as an infinite loop around a PG_TRY - * construct. The reason is that this is the bottom of the exception - * stack, and so with PG_TRY there would be no exception handler in force - * at all during the CATCH part. By leaving the outermost setjmp always - * active, we have at least some chance of recovering from an error during - * error recovery. (If we get into an infinite loop thereby, it will soon - * be stopped by overflow of elog.c's internal state stack.) + * You might wonder why this isn't coded as an infinite loop around a + * PG_TRY construct. The reason is that this is the bottom of the + * exception stack, and so with PG_TRY there would be no exception handler + * in force at all during the CATCH part. By leaving the outermost setjmp + * always active, we have at least some chance of recovering from an error + * during error recovery. (If we get into an infinite loop thereby, it + * will soon be stopped by overflow of elog.c's internal state stack.) */ if (sigsetjmp(local_sigjmp_buf, 1) != 0) diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index a293610bdaf..09919dbbc5a 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.97 2005/11/03 21:35:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.98 2005/11/22 18:17:21 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -757,8 +757,8 @@ PortalRunSelect(Portal portal, /* * Force the queryDesc destination to the right thing. This supports - * MOVE, for example, which will pass in dest = DestNone. This is okay - * to change as long as we do it on every fetch. (The Executor must not + * MOVE, for example, which will pass in dest = DestNone. This is okay to + * change as long as we do it on every fetch. (The Executor must not * assume that dest never changes.) */ if (queryDesc) @@ -962,8 +962,8 @@ PortalRunUtility(Portal portal, Query *query, * say, it has to update an index with expressions that invoke * user-defined functions, then it had better have a snapshot. * - * Note we assume that caller will take care of restoring ActiveSnapshot on - * exit/error. + * Note we assume that caller will take care of restoring ActiveSnapshot + * on exit/error. */ if (!(IsA(utilityStmt, TransactionStmt) || IsA(utilityStmt, LockStmt) || @@ -1015,11 +1015,11 @@ PortalRunMulti(Portal portal, ListCell *planlist_item; /* - * If the destination is DestRemoteExecute, change to DestNone. The reason - * is that the client won't be expecting any tuples, and indeed has no way - * to know what they are, since there is no provision for Describe to send - * a RowDescription message when this portal execution strategy is in - * effect. This presently will only affect SELECT commands added to + * If the destination is DestRemoteExecute, change to DestNone. The + * reason is that the client won't be expecting any tuples, and indeed has + * no way to know what they are, since there is no provision for Describe + * to send a RowDescription message when this portal execution strategy is + * in effect. This presently will only affect SELECT commands added to * non-SELECT queries by rewrite rules: such commands will be executed, * but the results will be discarded unless you use "simple Query" * protocol. @@ -1101,9 +1101,9 @@ PortalRunMulti(Portal portal, * If a command completion tag was supplied, use it. Otherwise use the * portal's commandTag as the default completion tag. * - * Exception: clients will expect INSERT/UPDATE/DELETE tags to have counts, - * so fake something up if necessary. (This could happen if the original - * query was replaced by a DO INSTEAD rule.) + * Exception: clients will expect INSERT/UPDATE/DELETE tags to have + * counts, so fake something up if necessary. (This could happen if the + * original query was replaced by a DO INSTEAD rule.) */ if (completionTag && completionTag[0] == '\0') { diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 7ad06baf517..e8f6379b929 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.248 2005/11/22 15:24:18 adunstan Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.249 2005/11/22 18:17:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -146,7 +146,7 @@ DropErrorMsgNonExistent(RangeVar *rel, char rightkind, bool missing_ok) { if (rentry->kind == rightkind) { - if (! missing_ok) + if (!missing_ok) { ereport(ERROR, (errcode(rentry->nonexistent_code), @@ -160,7 +160,7 @@ DropErrorMsgNonExistent(RangeVar *rel, char rightkind, bool missing_ok) } } - Assert(rentry->kind != '\0'); /* Should be impossible */ + Assert(rentry->kind != '\0'); /* Should be impossible */ } /* @@ -586,7 +586,7 @@ ProcessUtility(Node *parsetree, case OBJECT_TYPE: /* RemoveType does its own permissions checks */ - RemoveType(names, stmt->behavior, + RemoveType(names, stmt->behavior, stmt->missing_ok); break; @@ -595,7 +595,7 @@ ProcessUtility(Node *parsetree, /* * RemoveDomain does its own permissions checks */ - RemoveDomain(names, stmt->behavior, + RemoveDomain(names, stmt->behavior, stmt->missing_ok); break; |
