diff options
author | Tom Lane | 2017-06-21 19:35:54 +0000 |
---|---|---|
committer | Tom Lane | 2017-06-21 19:35:54 +0000 |
commit | 382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch) | |
tree | f558251492f2c6f86e3566f7a82f9d00509122c2 /src/bin/pg_upgrade/option.c | |
parent | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff) |
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they
flow past the right margin.
By default, BSD indent lines up statement continuation lines that are
within parentheses so that they start just to the right of the preceding
left parenthesis. However, traditionally, if that resulted in the
continuation line extending to the right of the desired right margin,
then indent would push it left just far enough to not overrun the margin,
if it could do so without making the continuation line start to the left of
the current statement indent. That makes for a weird mix of indentations
unless one has been completely rigid about never violating the 80-column
limit.
This behavior has been pretty universally panned by Postgres developers.
Hence, disable it with indent's new -lpl switch, so that parenthesized
lines are always lined up with the preceding left paren.
This patch is much less interesting than the first round of indent
changes, but also bulkier, so I thought it best to separate the effects.
Discussion: https://postgr.es/m/[email protected]
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/bin/pg_upgrade/option.c')
-rw-r--r-- | src/bin/pg_upgrade/option.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c index 5a556e7b307..de5bfddf5cd 100644 --- a/src/bin/pg_upgrade/option.c +++ b/src/bin/pg_upgrade/option.c @@ -22,7 +22,7 @@ static void usage(void); static void check_required_directory(char **dirpath, char **configpath, - char *envVarName, char *cmdLineOption, char *description); + char *envVarName, char *cmdLineOption, char *description); #define FIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" @@ -218,7 +218,7 @@ parseCommandLine(int argc, char *argv[]) /* Start with newline because we might be appending to a file. */ fprintf(fp, "\n" - "-----------------------------------------------------------------\n" + "-----------------------------------------------------------------\n" " pg_upgrade run on %s" "-----------------------------------------------------------------\n\n", ctime(&run_time)); @@ -243,9 +243,9 @@ parseCommandLine(int argc, char *argv[]) check_required_directory(&new_cluster.bindir, NULL, "PGBINNEW", "-B", _("new cluster binaries reside")); check_required_directory(&old_cluster.pgdata, &old_cluster.pgconfig, - "PGDATAOLD", "-d", _("old cluster data resides")); + "PGDATAOLD", "-d", _("old cluster data resides")); check_required_directory(&new_cluster.pgdata, &new_cluster.pgconfig, - "PGDATANEW", "-D", _("new cluster data resides")); + "PGDATANEW", "-D", _("new cluster data resides")); #ifdef WIN32 @@ -296,11 +296,11 @@ usage(void) printf(_(" -?, --help show this help, then exit\n")); printf(_("\n" "Before running pg_upgrade you must:\n" - " create a new database cluster (using the new version of initdb)\n" + " create a new database cluster (using the new version of initdb)\n" " shutdown the postmaster servicing the old cluster\n" " shutdown the postmaster servicing the new cluster\n")); printf(_("\n" - "When you run pg_upgrade, you must provide the following information:\n" + "When you run pg_upgrade, you must provide the following information:\n" " the data directory for the old cluster (-d DATADIR)\n" " the data directory for the new cluster (-D DATADIR)\n" " the \"bin\" directory for the old version (-b BINDIR)\n" @@ -478,7 +478,7 @@ get_sock_dir(ClusterInfo *cluster, bool live_check) pg_fatal("Cannot open file %s: %m\n", filename); for (lineno = 1; - lineno <= Max(LOCK_FILE_LINE_PORT, LOCK_FILE_LINE_SOCKET_DIR); + lineno <= Max(LOCK_FILE_LINE_PORT, LOCK_FILE_LINE_SOCKET_DIR); lineno++) { if (fgets(line, sizeof(line), fp) == NULL) |