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/bin | |
| 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/bin')
| -rw-r--r-- | src/bin/initdb/initdb.c | 21 | ||||
| -rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 8 | ||||
| -rw-r--r-- | src/bin/pg_dump/dumputils.c | 10 | ||||
| -rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 15 | ||||
| -rw-r--r-- | src/bin/pg_dump/pg_dump.c | 64 | ||||
| -rw-r--r-- | src/bin/pg_dump/pg_dump_sort.c | 14 | ||||
| -rw-r--r-- | src/bin/psql/common.c | 14 | ||||
| -rw-r--r-- | src/bin/psql/describe.c | 6 | ||||
| -rw-r--r-- | src/bin/psql/startup.c | 4 |
9 files changed, 78 insertions, 78 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index d79e4985a7a..ad9e4b6027c 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -42,7 +42,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * Portions taken from FreeBSD. * - * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.99 2005/10/15 02:49:37 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.100 2005/11/22 18:17:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -537,10 +537,11 @@ mkdir_p(char *path, mode_t omode) * existing directory, effects equivalent to those caused by the * following command shall occcur: * - * mkdir -p -m $(umask -S),u+wx $(dirname dir) && mkdir [-m mode] dir + * mkdir -p -m $(umask -S),u+wx $(dirname dir) && mkdir [-m mode] + * dir * - * We change the user's umask and then restore it, instead of doing - * chmod's. + * We change the user's umask and then restore it, instead of + * doing chmod's. */ oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); @@ -1329,8 +1330,8 @@ bootstrap_template1(char *short_version) /* * Pass correct LC_xxx environment to bootstrap. * - * The shell script arranged to restore the LC settings afterwards, but there - * doesn't seem to be any compelling reason to do that. + * The shell script arranged to restore the LC settings afterwards, but + * there doesn't seem to be any compelling reason to do that. */ snprintf(cmd, sizeof(cmd), "LC_COLLATE=%s", lc_collate); putenv(xstrdup(cmd)); @@ -1555,8 +1556,8 @@ setup_depend(void) * for instance) but generating only the minimum required set of * dependencies seems hard. * - * Note that we deliberately do not pin the system views, which haven't - * been created yet. + * Note that we deliberately do not pin the system views, which + * haven't been created yet. * * First delete any already-made entries; PINs override all else, and * must be the only entries for their objects. @@ -2651,8 +2652,8 @@ main(int argc, char *argv[]) /* * Determine platform-specific config settings * - * Use reasonable values if kernel will let us, else scale back. Probe for - * max_connections first since it is subject to more constraints than + * Use reasonable values if kernel will let us, else scale back. Probe + * for max_connections first since it is subject to more constraints than * shared_buffers. */ diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 7c12a72c6db..1ed33cc714b 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.61 2005/10/15 02:49:38 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.62 2005/11/22 18:17:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -334,9 +334,9 @@ start_postmaster(void) /* * Win32 needs START /B rather than "&". * - * Win32 has a problem with START and quoted executable names. You must add a - * "" as the title at the beginning so you can quote the executable name: - * http://www.winnetmag.com/Article/ArticleID/14589/14589.html + * Win32 has a problem with START and quoted executable names. You must + * add a "" as the title at the beginning so you can quote the executable + * name: http://www.winnetmag.com/Article/ArticleID/14589/14589.html * http://dev.remotenetworktechnology.com/cmd/cmdfaq.htm */ if (log_file != NULL) diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index aa999173b2b..3018676af46 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.20 2005/10/15 02:49:38 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.21 2005/11/22 18:17:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -261,10 +261,10 @@ parsePGArray(const char *atext, char ***itemarray, int *nitems) * either raw data, or surrounded by double quotes (in which case embedded * characters including backslashes and quotes are backslashed). * - * We build the result as an array of pointers followed by the actual string - * data, all in one malloc block for convenience of deallocation. The - * worst-case storage need is not more than one pointer and one character - * for each input character (consider "{,,,,,,,,,,}"). + * We build the result as an array of pointers followed by the actual + * string data, all in one malloc block for convenience of deallocation. + * The worst-case storage need is not more than one pointer and one + * character for each input character (consider "{,,,,,,,,,,}"). */ *itemarray = NULL; *nitems = 0; diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 54eb9769200..a45018533ed 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.117 2005/10/15 02:49:38 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.118 2005/11/22 18:17:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -325,8 +325,9 @@ RestoreArchive(Archive *AHX, RestoreOptions *ropt) * withing a database connection. Pre 1.3 archives can * not use DB connections and are sent to output only. * - * For V1.3+, the table data MUST have a copy statement - * so that we can go into appropriate mode with libpq. + * For V1.3+, the table data MUST have a copy + * statement so that we can go into appropriate mode + * with libpq. */ if (te->copyStmt && strlen(te->copyStmt) > 0) ahprintf(AH, "%s", te->copyStmt); @@ -1276,8 +1277,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o) * Read the flag indicating the state of the data pointer. Check if valid * and die if not. * - * This used to be handled by a negative or zero pointer, now we use an extra - * byte specifically for the state. + * This used to be handled by a negative or zero pointer, now we use an + * extra byte specifically for the state. */ offsetFlg = (*AH->ReadBytePtr) (AH) & 0xFF; @@ -1566,8 +1567,8 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt, /* * Not used; maybe later.... * - * AH->workDir = strdup(FileSpec); for(i=strlen(FileSpec) ; i > 0 ; i--) - * if (AH->workDir[i-1] == '/') + * AH->workDir = strdup(FileSpec); for(i=strlen(FileSpec) ; i > 0 ; + * i--) if (AH->workDir[i-1] == '/') */ } else diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 895d156317e..ab21b13ee44 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12,7 +12,7 @@ * by PostgreSQL * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.422 2005/10/15 02:49:38 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.423 2005/11/22 18:17:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -865,26 +865,26 @@ dumpTableData_copy(Archive *fout, void *dcontext) /* * THROTTLE: * - * There was considerable discussion in late July, 2000 regarding slowing - * down pg_dump when backing up large tables. Users with both slow & - * fast (muti-processor) machines experienced performance degradation - * when doing a backup. + * There was considerable discussion in late July, 2000 regarding + * slowing down pg_dump when backing up large tables. Users with both + * slow & fast (muti-processor) machines experienced performance + * degradation when doing a backup. * - * Initial attempts based on sleeping for a number of ms for each ms of - * work were deemed too complex, then a simple 'sleep in each loop' + * Initial attempts based on sleeping for a number of ms for each ms + * of work were deemed too complex, then a simple 'sleep in each loop' * implementation was suggested. The latter failed because the loop * was too tight. Finally, the following was implemented: * - * If throttle is non-zero, then See how long since the last sleep. Work - * out how long to sleep (based on ratio). If sleep is more than + * If throttle is non-zero, then See how long since the last sleep. + * Work out how long to sleep (based on ratio). If sleep is more than * 100ms, then sleep reset timer EndIf EndIf * - * where the throttle value was the number of ms to sleep per ms of work. - * The calculation was done in each loop. + * where the throttle value was the number of ms to sleep per ms of + * work. The calculation was done in each loop. * - * Most of the hard work is done in the backend, and this solution still - * did not work particularly well: on slow machines, the ratio was - * 50:1, and on medium paced machines, 1:1, and on fast + * Most of the hard work is done in the backend, and this solution + * still did not work particularly well: on slow machines, the ratio + * was 50:1, and on medium paced machines, 1:1, and on fast * multi-processor machines, it had little or no effect, for reasons * that were unclear. * @@ -1015,9 +1015,9 @@ dumpTableData_insert(Archive *fout, void *dcontext) * strtod() and friends might accept NaN, so we * can't use that to test. * - * In reality we only need to defend against infinity - * and NaN, so we need not get too crazy about - * pattern matching here. + * In reality we only need to defend against + * infinity and NaN, so we need not get too crazy + * about pattern matching here. */ const char *s = PQgetvalue(res, tuple, field); @@ -2435,21 +2435,21 @@ getTables(int *numTables) /* * Find all the tables (including views and sequences). * - * We include system catalogs, so that we can work if a user table is defined - * to inherit from a system catalog (pretty weird, but...) + * We include system catalogs, so that we can work if a user table is + * defined to inherit from a system catalog (pretty weird, but...) * * We ignore tables that are not type 'r' (ordinary relation), 'S' * (sequence), 'v' (view), or 'c' (composite type). * - * Composite-type table entries won't be dumped as such, but we have to make - * a DumpableObject for them so that we can track dependencies of the + * Composite-type table entries won't be dumped as such, but we have to + * make a DumpableObject for them so that we can track dependencies of the * composite type (pg_depend entries for columns of the composite type * link to the pg_class entry not the pg_type entry). * - * Note: in this phase we should collect only a minimal amount of information - * about each table, basically just enough to decide if it is interesting. - * We must fetch all tables in this phase because otherwise we cannot - * correctly identify inherited columns, serial columns, etc. + * Note: in this phase we should collect only a minimal amount of + * information about each table, basically just enough to decide if it is + * interesting. We must fetch all tables in this phase because otherwise + * we cannot correctly identify inherited columns, serial columns, etc. */ if (g_fout->remoteVersion >= 80000) @@ -6907,8 +6907,8 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) /* * Not Null constraint --- suppress if inherited * - * Note: we could suppress this for serial columns since SERIAL - * implies NOT NULL. We choose not to for forward + * Note: we could suppress this for serial columns since + * SERIAL implies NOT NULL. We choose not to for forward * compatibility, since there has been some talk of making * SERIAL not imply NOT NULL, in which case the explicit * specification would be needed. @@ -7575,12 +7575,12 @@ dumpSequence(Archive *fout, TableInfo *tbinfo) /* * The logic we use for restoring sequences is as follows: * - * Add a basic CREATE SEQUENCE statement (use last_val for start if called is - * false, else use min_val for start_val). Skip this if the sequence came - * from a SERIAL column. + * Add a basic CREATE SEQUENCE statement (use last_val for start if called + * is false, else use min_val for start_val). Skip this if the sequence + * came from a SERIAL column. * - * Add a 'SETVAL(seq, last_val, iscalled)' at restore-time iff we load data. - * We do this for serial sequences too. + * Add a 'SETVAL(seq, last_val, iscalled)' at restore-time iff we load + * data. We do this for serial sequences too. */ if (!dataOnly && !OidIsValid(tbinfo->owning_tab)) diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 7e91d9bb79b..9e4cd35b468 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.11 2005/10/15 02:49:39 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.12 2005/11/22 18:17:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -305,10 +305,10 @@ TopoSort(DumpableObject **objs, * Now initialize the heap of items-ready-to-output by filling it with the * indexes of items that already have beforeConstraints[id] == 0. * - * The essential property of a heap is heap[(j-1)/2] >= heap[j] for each j in - * the range 1..heapLength-1 (note we are using 0-based subscripts here, - * while the discussion in Knuth assumes 1-based subscripts). So, if we - * simply enter the indexes into pendingHeap[] in decreasing order, we + * The essential property of a heap is heap[(j-1)/2] >= heap[j] for each j + * in the range 1..heapLength-1 (note we are using 0-based subscripts + * here, while the discussion in Knuth assumes 1-based subscripts). So, if + * we simply enter the indexes into pendingHeap[] in decreasing order, we * a-fortiori have the heap invariant satisfied at completion of this * loop, and don't need to do any sift-up comparisons. */ @@ -469,8 +469,8 @@ findDependencyLoops(DumpableObject **objs, int nObjs, int totObjs) * representation. After we identify and process a loop, we can add it to * the initial part of the workspace just by moving the boundary pointer. * - * When we determine that an object is not part of any interesting loop, we - * also add it to the initial part of the workspace. This is not + * When we determine that an object is not part of any interesting loop, + * we also add it to the initial part of the workspace. This is not * necessary for correctness, but saves later invocations of findLoop() * from uselessly chasing references to such an object. * diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index bddbd7e539f..8146cd22cbd 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.110 2005/11/04 18:35:40 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/psql/common.c,v 1.111 2005/11/22 18:17:29 momjian Exp $ */ #include "postgres_fe.h" #include "common.h" @@ -268,7 +268,6 @@ handle_sigint(SIGNAL_ARGS) } errno = save_errno; /* just in case the write changed it */ } - #else /* WIN32 */ static BOOL WINAPI @@ -323,7 +322,6 @@ setup_cancel_handler(void) done = true; } } - #endif /* WIN32 */ @@ -531,9 +529,9 @@ ReportSyntaxErrorPosition(const PGresult *result, const char *query) * want to think about coping with their variable screen width, but * not today.) * - * Extract line number and begin and end indexes of line containing error - * location. There will not be any newlines or carriage returns in - * the selected extract. + * Extract line number and begin and end indexes of line containing + * error location. There will not be any newlines or carriage returns + * in the selected extract. */ for (i = 0; i < clen; i++) { @@ -1217,8 +1215,8 @@ command_no_begin(const char *query) * gives rise to a TransactionStmt in the backend grammar, except for the * savepoint-related commands. * - * (We assume that START must be START TRANSACTION, since there is presently - * no other "START foo" command.) + * (We assume that START must be START TRANSACTION, since there is + * presently no other "START foo" command.) */ if (wordlen == 5 && pg_strncasecmp(query, "abort", 5) == 0) return true; diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index aefb6041abc..5caf16df8cb 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.129 2005/10/27 13:34:47 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.130 2005/11/22 18:17:29 momjian Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -1843,8 +1843,8 @@ processNamePattern(PQExpBuffer buf, const char *pattern, /* * Ordinary data character, transfer to pattern * - * Inside double quotes, or at all times if parsing an operator name, - * quote regexp special characters with a backslash to avoid + * Inside double quotes, or at all times if parsing an operator + * name, quote regexp special characters with a backslash to avoid * regexp errors. Outside quotes, however, let them pass through * as-is; this lets knowledgeable users build regexp expressions * that are more powerful than shell-style patterns. diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index c4d322691ea..8aa2b626b39 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.127 2005/11/17 23:42:26 adunstan Exp $ + * $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.128 2005/11/22 18:17:29 momjian Exp $ */ #include "postgres_fe.h" @@ -206,7 +206,7 @@ main(int argc, char *argv[]) { need_pass = false; pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL, - options.action == ACT_LIST_DB && options.dbname == NULL ? + options.action == ACT_LIST_DB && options.dbname == NULL ? "postgres" : options.dbname, username, password); |
