diff options
Diffstat (limited to 'src/bin')
50 files changed, 640 insertions, 640 deletions
diff --git a/src/bin/initdb/findtimezone.c b/src/bin/initdb/findtimezone.c index 96aa39021e8..c9b4141a16f 100644 --- a/src/bin/initdb/findtimezone.c +++ b/src/bin/initdb/findtimezone.c @@ -1221,7 +1221,7 @@ identify_system_timezone(void) */ memset(localtzname, 0, sizeof(localtzname)); if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones", + "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones", 0, KEY_READ, &rootKey) != ERROR_SUCCESS) diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 7fdaca868a1..0f22e6d29a4 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -584,12 +584,12 @@ exit_nicely(void) { if (made_new_pgdata || found_existing_pgdata) fprintf(stderr, - _("%s: data directory \"%s\" not removed at user's request\n"), + _("%s: data directory \"%s\" not removed at user's request\n"), progname, pg_data); if (made_new_xlogdir || found_existing_xlogdir) fprintf(stderr, - _("%s: WAL directory \"%s\" not removed at user's request\n"), + _("%s: WAL directory \"%s\" not removed at user's request\n"), progname, xlog_dir); } @@ -769,16 +769,16 @@ check_input(char *path) _("%s: file \"%s\" does not exist\n"), progname, path); fprintf(stderr, _("This might mean you have a corrupted installation or identified\n" - "the wrong directory with the invocation option -L.\n")); + "the wrong directory with the invocation option -L.\n")); } else { fprintf(stderr, - _("%s: could not access file \"%s\": %s\n"), progname, path, + _("%s: could not access file \"%s\": %s\n"), progname, path, strerror(errno)); fprintf(stderr, _("This might mean you have a corrupted installation or identified\n" - "the wrong directory with the invocation option -L.\n")); + "the wrong directory with the invocation option -L.\n")); } exit(1); } @@ -787,8 +787,8 @@ check_input(char *path) fprintf(stderr, _("%s: file \"%s\" is not a regular file\n"), progname, path); fprintf(stderr, - _("This might mean you have a corrupted installation or identified\n" - "the wrong directory with the invocation option -L.\n")); + _("This might mean you have a corrupted installation or identified\n" + "the wrong directory with the invocation option -L.\n")); exit(1); } } @@ -1078,7 +1078,7 @@ setup_config(void) "default_text_search_config = 'pg_catalog.%s'", escape_quotes(default_text_search_config)); conflines = replace_token(conflines, - "#default_text_search_config = 'pg_catalog.simple'", + "#default_text_search_config = 'pg_catalog.simple'", repltok); default_timezone = select_default_timezone(share_path); @@ -1216,11 +1216,11 @@ setup_config(void) getaddrinfo("::1", NULL, &hints, &gai_result) != 0) { conflines = replace_token(conflines, - "host all all ::1", - "#host all all ::1"); + "host all all ::1", + "#host all all ::1"); conflines = replace_token(conflines, - "host replication all ::1", - "#host replication all ::1"); + "host replication all ::1", + "#host replication all ::1"); } } #else /* !HAVE_IPV6 */ @@ -1603,7 +1603,7 @@ setup_description(FILE *cmdfd) /* Create default descriptions for operator implementation functions */ PG_CMD_PUTS("WITH funcdescs AS ( " "SELECT p.oid as p_oid, oprname, " - "coalesce(obj_description(o.oid, 'pg_operator'),'') as opdesc " + "coalesce(obj_description(o.oid, 'pg_operator'),'') as opdesc " "FROM pg_proc p JOIN pg_operator o ON oprcode = p.oid ) " "INSERT INTO pg_description " " SELECT p_oid, 'pg_proc'::regclass, 0, " @@ -1611,7 +1611,7 @@ setup_description(FILE *cmdfd) " FROM funcdescs " " WHERE opdesc NOT LIKE 'deprecated%' AND " " NOT EXISTS (SELECT 1 FROM pg_description " - " WHERE objoid = p_oid AND classoid = 'pg_proc'::regclass);\n\n"); + " WHERE objoid = p_oid AND classoid = 'pg_proc'::regclass);\n\n"); /* * Even though the tables are temp, drop them explicitly so they don't get @@ -2184,9 +2184,9 @@ check_locale_encoding(const char *locale, int user_enc) fprintf(stderr, _("%s: encoding mismatch\n"), progname); fprintf(stderr, _("The encoding you selected (%s) and the encoding that the\n" - "selected locale uses (%s) do not match. This would lead to\n" - "misbehavior in various character string processing functions.\n" - "Rerun %s and either do not specify an encoding explicitly,\n" + "selected locale uses (%s) do not match. This would lead to\n" + "misbehavior in various character string processing functions.\n" + "Rerun %s and either do not specify an encoding explicitly,\n" "or choose a matching combination.\n"), pg_encoding_to_char(user_enc), pg_encoding_to_char(locale_enc), @@ -2272,7 +2272,7 @@ usage(const char *progname) printf(_(" --no-locale equivalent to --locale=C\n")); printf(_(" --pwfile=FILE read password for the new superuser from file\n")); printf(_(" -T, --text-search-config=CFG\n" - " default text search configuration\n")); + " default text search configuration\n")); printf(_(" -U, --username=NAME database superuser name\n")); printf(_(" -W, --pwprompt prompt for a password for the new superuser\n")); printf(_(" -X, --waldir=WALDIR location for the write-ahead log directory\n")); @@ -2299,7 +2299,7 @@ check_authmethod_unspecified(const char **authmethod) { authwarning = _("\nWARNING: enabling \"trust\" authentication for local connections\n" "You can change this by editing pg_hba.conf or using the option -A, or\n" - "--auth-local and --auth-host, the next time you run initdb.\n"); + "--auth-local and --auth-host, the next time you run initdb.\n"); *authmethod = "trust"; } } @@ -2489,18 +2489,18 @@ setup_locale_encoding(void) */ #ifdef WIN32 printf(_("Encoding \"%s\" implied by locale is not allowed as a server-side encoding.\n" - "The default database encoding will be set to \"%s\" instead.\n"), + "The default database encoding will be set to \"%s\" instead.\n"), pg_encoding_to_char(ctype_enc), pg_encoding_to_char(PG_UTF8)); ctype_enc = PG_UTF8; encodingid = encodingid_to_string(ctype_enc); #else fprintf(stderr, - _("%s: locale \"%s\" requires unsupported encoding \"%s\"\n"), + _("%s: locale \"%s\" requires unsupported encoding \"%s\"\n"), progname, lc_ctype, pg_encoding_to_char(ctype_enc)); fprintf(stderr, - _("Encoding \"%s\" is not allowed as a server-side encoding.\n" - "Rerun %s with a different locale selection.\n"), + _("Encoding \"%s\" is not allowed as a server-side encoding.\n" + "Rerun %s with a different locale selection.\n"), pg_encoding_to_char(ctype_enc), progname); exit(1); #endif diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 2c4efd76457..3ad06995ec1 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -194,18 +194,18 @@ cleanup_directories_atexit(void) { if (made_new_pgdata || found_existing_pgdata) fprintf(stderr, - _("%s: data directory \"%s\" not removed at user's request\n"), + _("%s: data directory \"%s\" not removed at user's request\n"), progname, basedir); if (made_new_xlogdir || found_existing_xlogdir) fprintf(stderr, - _("%s: WAL directory \"%s\" not removed at user's request\n"), + _("%s: WAL directory \"%s\" not removed at user's request\n"), progname, xlog_dir); } if (made_tablespace_dirs || found_tablespace_dirs) fprintf(stderr, - _("%s: changes to tablespace directories will not be undone\n"), + _("%s: changes to tablespace directories will not be undone\n"), progname); } @@ -332,13 +332,13 @@ usage(void) printf(_(" -D, --pgdata=DIRECTORY receive base backup into directory\n")); printf(_(" -F, --format=p|t output format (plain (default), tar)\n")); printf(_(" -r, --max-rate=RATE maximum transfer rate to transfer data directory\n" - " (in kB/s, or use suffix \"k\" or \"M\")\n")); + " (in kB/s, or use suffix \"k\" or \"M\")\n")); printf(_(" -R, --write-recovery-conf\n" - " write recovery.conf for replication\n")); + " write recovery.conf for replication\n")); printf(_(" -S, --slot=SLOTNAME replication slot to use\n")); printf(_(" --no-slot prevent creation of temporary replication slot\n")); printf(_(" -T, --tablespace-mapping=OLDDIR=NEWDIR\n" - " relocate tablespace in OLDDIR to NEWDIR\n")); + " relocate tablespace in OLDDIR to NEWDIR\n")); printf(_(" -X, --wal-method=none|fetch|stream\n" " include required WAL files with specified method\n")); printf(_(" --waldir=WALDIR location for the write-ahead log directory\n")); @@ -414,7 +414,7 @@ reached_end_position(XLogRecPtr segendpos, uint32 timeline, if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2) { fprintf(stderr, - _("%s: could not parse write-ahead log location \"%s\"\n"), + _("%s: could not parse write-ahead log location \"%s\"\n"), progname, xlogend); exit(1); } @@ -771,8 +771,8 @@ progress_report(int tablespacenum, const char *filename, bool force) tablespacenum, tablespacecount, /* Prefix with "..." if we do leading truncation */ truncate ? "..." : "", - truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH, - truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH, + truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH, + truncate ? VERBOSE_FILENAME_LENGTH - 3 : VERBOSE_FILENAME_LENGTH, /* Truncate filename at beginning if it's too long */ truncate ? filename + strlen(filename) - VERBOSE_FILENAME_LENGTH + 3 : filename); } @@ -1112,7 +1112,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) if (gzclose(ztarfile) != 0) { fprintf(stderr, - _("%s: could not close compressed file \"%s\": %s\n"), + _("%s: could not close compressed file \"%s\": %s\n"), progname, filename, get_gz_error(ztarfile)); disconnect_and_exit(1); } @@ -1412,11 +1412,11 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) */ if (!((pg_str_endswith(filename, "/pg_wal") || pg_str_endswith(filename, "/pg_xlog") || - pg_str_endswith(filename, "/archive_status")) && + pg_str_endswith(filename, "/archive_status")) && errno == EEXIST)) { fprintf(stderr, - _("%s: could not create directory \"%s\": %s\n"), + _("%s: could not create directory \"%s\": %s\n"), progname, filename, strerror(errno)); disconnect_and_exit(1); } @@ -1758,7 +1758,7 @@ BaseBackup(void) if (verbose) fprintf(stderr, - _("%s: initiating base backup, waiting for checkpoint to complete\n"), + _("%s: initiating base backup, waiting for checkpoint to complete\n"), progname); if (showprogress && !verbose) @@ -1907,14 +1907,14 @@ BaseBackup(void) if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, - _("%s: could not get write-ahead log end position from server: %s"), + _("%s: could not get write-ahead log end position from server: %s"), progname, PQerrorMessage(conn)); disconnect_and_exit(1); } if (PQntuples(res) != 1) { fprintf(stderr, - _("%s: no write-ahead log end position returned from server\n"), + _("%s: no write-ahead log end position returned from server\n"), progname); disconnect_and_exit(1); } @@ -1998,7 +1998,7 @@ BaseBackup(void) if (sscanf(xlogend, "%X/%X", &hi, &lo) != 2) { fprintf(stderr, - _("%s: could not parse write-ahead log location \"%s\"\n"), + _("%s: could not parse write-ahead log location \"%s\"\n"), progname, xlogend); disconnect_and_exit(1); } @@ -2312,7 +2312,7 @@ main(int argc, char **argv) if (format == 't' && includewal == STREAM_WAL && strcmp(basedir, "-") == 0) { fprintf(stderr, - _("%s: cannot stream write-ahead logs in tar mode to stdout\n"), + _("%s: cannot stream write-ahead logs in tar mode to stdout\n"), progname); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); @@ -2322,7 +2322,7 @@ main(int argc, char **argv) if (replication_slot && includewal != STREAM_WAL) { fprintf(stderr, - _("%s: replication slots can only be used with WAL streaming\n"), + _("%s: replication slots can only be used with WAL streaming\n"), progname); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); @@ -2405,7 +2405,7 @@ main(int argc, char **argv) * renamed to pg_wal in post-10 clusters. */ linkloc = psprintf("%s/%s", basedir, - PQserverVersion(conn) < MINIMUM_VERSION_FOR_PG_WAL ? + PQserverVersion(conn) < MINIMUM_VERSION_FOR_PG_WAL ? "pg_xlog" : "pg_wal"); #ifdef HAVE_SYMLINK diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 15caf32a764..f3c7668d50e 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -405,7 +405,7 @@ StreamLog(void) if (verbose) fprintf(stderr, _("%s: starting log streaming at %X/%X (timeline %u)\n"), - progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos, + progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos, stream.timeline); stream.stream_stop = stop_streaming; diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index fbe9fbb9a81..6811a55e764 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -132,9 +132,9 @@ sendFeedback(PGconn *conn, TimestampTz now, bool force, bool replyRequested) if (verbose) fprintf(stderr, - _("%s: confirming write up to %X/%X, flush to %X/%X (slot %s)\n"), + _("%s: confirming write up to %X/%X, flush to %X/%X (slot %s)\n"), progname, - (uint32) (output_written_lsn >> 32), (uint32) output_written_lsn, + (uint32) (output_written_lsn >> 32), (uint32) output_written_lsn, (uint32) (output_fsync_lsn >> 32), (uint32) output_fsync_lsn, replication_slot); @@ -241,7 +241,7 @@ StreamLogicalLog(void) /* Initiate the replication stream at specified location */ appendPQExpBuffer(query, "START_REPLICATION SLOT \"%s\" LOGICAL %X/%X", - replication_slot, (uint32) (startpos >> 32), (uint32) startpos); + replication_slot, (uint32) (startpos >> 32), (uint32) startpos); /* print options if there are any */ if (noptions) @@ -570,7 +570,7 @@ StreamLogicalLog(void) if (ret < 0) { fprintf(stderr, - _("%s: could not write %u bytes to log file \"%s\": %s\n"), + _("%s: could not write %u bytes to log file \"%s\": %s\n"), progname, bytes_left, outfile, strerror(errno)); goto error; @@ -584,7 +584,7 @@ StreamLogicalLog(void) if (write(outfd, "\n", 1) != 1) { fprintf(stderr, - _("%s: could not write %u bytes to log file \"%s\": %s\n"), + _("%s: could not write %u bytes to log file \"%s\": %s\n"), progname, 1, outfile, strerror(errno)); goto error; diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index 0fe4df126d2..15932c60b5a 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -116,7 +116,7 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint) if (size < 0) { fprintf(stderr, - _("%s: could not get size of write-ahead log file \"%s\": %s\n"), + _("%s: could not get size of write-ahead log file \"%s\": %s\n"), progname, fn, stream->walmethod->getlasterror()); return false; } @@ -191,8 +191,8 @@ close_walfile(StreamCtl *stream, XLogRecPtr pos) if (currpos == -1) { fprintf(stderr, - _("%s: could not determine seek position in file \"%s\": %s\n"), - progname, current_walfile_name, stream->walmethod->getlasterror()); + _("%s: could not determine seek position in file \"%s\": %s\n"), + progname, current_walfile_name, stream->walmethod->getlasterror()); stream->walmethod->close(walfile, CLOSE_UNLINK); walfile = NULL; @@ -219,7 +219,7 @@ close_walfile(StreamCtl *stream, XLogRecPtr pos) if (r != 0) { fprintf(stderr, _("%s: could not close file \"%s\": %s\n"), - progname, current_walfile_name, stream->walmethod->getlasterror()); + progname, current_walfile_name, stream->walmethod->getlasterror()); return false; } @@ -511,7 +511,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) if (stream->timeline > atoi(PQgetvalue(res, 0, 1))) { fprintf(stderr, - _("%s: starting timeline %u is not present in the server\n"), + _("%s: starting timeline %u is not present in the server\n"), progname, stream->timeline); PQclear(res); return false; @@ -525,7 +525,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) if (stream->temp_slot) { snprintf(query, sizeof(query), - "CREATE_REPLICATION_SLOT \"%s\" TEMPORARY PHYSICAL RESERVE_WAL", + "CREATE_REPLICATION_SLOT \"%s\" TEMPORARY PHYSICAL RESERVE_WAL", stream->replication_slot); res = PQexec(conn, query); if (PQresultStatus(res) != PGRES_TUPLES_OK) @@ -559,7 +559,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) { /* FIXME: we might send it ok, but get an error */ fprintf(stderr, _("%s: could not send replication command \"%s\": %s"), - progname, "TIMELINE_HISTORY", PQresultErrorMessage(res)); + progname, "TIMELINE_HISTORY", PQresultErrorMessage(res)); PQclear(res); return false; } @@ -652,7 +652,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) fprintf(stderr, _("%s: server stopped streaming timeline %u at %X/%X, but reported next timeline %u to begin at %X/%X\n"), progname, - stream->timeline, (uint32) (stoppos >> 32), (uint32) stoppos, + stream->timeline, (uint32) (stoppos >> 32), (uint32) stoppos, newtimeline, (uint32) (stream->startpos >> 32), (uint32) stream->startpos); goto error; } @@ -662,7 +662,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) if (PQresultStatus(res) != PGRES_COMMAND_OK) { fprintf(stderr, - _("%s: unexpected termination of replication stream: %s"), + _("%s: unexpected termination of replication stream: %s"), progname, PQresultErrorMessage(res)); PQclear(res); goto error; @@ -710,7 +710,7 @@ ReceiveXlogStream(PGconn *conn, StreamCtl *stream) error: if (walfile != NULL && stream->walmethod->close(walfile, CLOSE_NO_RENAME) != 0) fprintf(stderr, _("%s: could not close file \"%s\": %s\n"), - progname, current_walfile_name, stream->walmethod->getlasterror()); + progname, current_walfile_name, stream->walmethod->getlasterror()); walfile = NULL; return false; } @@ -750,7 +750,7 @@ ReadEndOfStreamingResult(PGresult *res, XLogRecPtr *startpos, uint32 *timeline) &startpos_xrecoff) != 2) { fprintf(stderr, - _("%s: could not parse next timeline's starting point \"%s\"\n"), + _("%s: could not parse next timeline's starting point \"%s\"\n"), progname, PQgetvalue(res, 0, 1)); return false; } @@ -1167,7 +1167,7 @@ ProcessXLogDataMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, bytes_to_write) != bytes_to_write) { fprintf(stderr, - _("%s: could not write %u bytes to WAL file \"%s\": %s\n"), + _("%s: could not write %u bytes to WAL file \"%s\": %s\n"), progname, bytes_to_write, current_walfile_name, stream->walmethod->getlasterror()); return false; diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 7ea3b0f8ee7..d7ba7e2c492 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -212,7 +212,7 @@ GetConnection(void) if (!tmpparam) { fprintf(stderr, - _("%s: could not determine server setting for integer_datetimes\n"), + _("%s: could not determine server setting for integer_datetimes\n"), progname); PQfinish(tmpconn); exit(1); @@ -221,7 +221,7 @@ GetConnection(void) if (strcmp(tmpparam, "on") != 0) { fprintf(stderr, - _("%s: integer_datetimes compile flag does not match server\n"), + _("%s: integer_datetimes compile flag does not match server\n"), progname); PQfinish(tmpconn); exit(1); @@ -282,7 +282,7 @@ RunIdentifySystem(PGconn *conn, char **sysid, TimeLineID *starttli, if (sscanf(PQgetvalue(res, 0, 2), "%X/%X", &hi, &lo) != 2) { fprintf(stderr, - _("%s: could not parse write-ahead log location \"%s\"\n"), + _("%s: could not parse write-ahead log location \"%s\"\n"), progname, PQgetvalue(res, 0, 2)); PQclear(res); diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c index 4c2edca8fe5..5fe02dee72c 100644 --- a/src/bin/pg_basebackup/walmethods.c +++ b/src/bin/pg_basebackup/walmethods.c @@ -534,7 +534,7 @@ tar_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_ * We open the tar file only when we first try to write to it. */ tar_data->fd = open(tar_data->tarfilename, - O_WRONLY | O_CREAT | PG_BINARY, S_IRUSR | S_IWUSR); + O_WRONLY | O_CREAT | PG_BINARY, S_IRUSR | S_IWUSR); if (tar_data->fd < 0) return NULL; diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 9e262dee8bf..095d68e21d9 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -170,7 +170,7 @@ write_eventlog(int level, const char *line) if (evtHandle == INVALID_HANDLE_VALUE) { evtHandle = RegisterEventSource(NULL, - event_source ? event_source : DEFAULT_EVENT_SOURCE); + event_source ? event_source : DEFAULT_EVENT_SOURCE); if (evtHandle == NULL) { evtHandle = INVALID_HANDLE_VALUE; @@ -660,7 +660,7 @@ test_postmaster_connection(pgpid_t pm_pid, bool do_checkpoint) * timeout first. */ snprintf(connstr, sizeof(connstr), - "dbname=postgres port=%d host='%s' connect_timeout=5", + "dbname=postgres port=%d host='%s' connect_timeout=5", portnum, host_str); } } @@ -1017,7 +1017,7 @@ do_stop(void) write_stderr(_("%s: server does not shut down\n"), progname); if (shutdown_mode == SMART_MODE) write_stderr(_("HINT: The \"-m fast\" option immediately disconnects sessions rather than\n" - "waiting for session-initiated disconnection.\n")); + "waiting for session-initiated disconnection.\n")); exit(1); } print_msg(_(" done\n")); @@ -1107,7 +1107,7 @@ do_restart(void) write_stderr(_("%s: server does not shut down\n"), progname); if (shutdown_mode == SMART_MODE) write_stderr(_("HINT: The \"-m fast\" option immediately disconnects sessions rather than\n" - "waiting for session-initiated disconnection.\n")); + "waiting for session-initiated disconnection.\n")); exit(1); } @@ -1492,10 +1492,10 @@ pgwin32_doRegister(void) } if ((hService = CreateService(hSCM, register_servicename, register_servicename, - SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, + SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, pgctl_start_type, SERVICE_ERROR_NORMAL, pgwin32_CommandLine(true), - NULL, NULL, "RPCSS\0", register_username, register_password)) == NULL) + NULL, NULL, "RPCSS\0", register_username, register_password)) == NULL) { CloseServiceHandle(hSCM); write_stderr(_("%s: could not register service \"%s\": error code %lu\n"), @@ -1781,10 +1781,10 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser /* Allocate list of SIDs to remove */ ZeroMemory(&dropSids, sizeof(dropSids)); if (!AllocateAndInitializeSid(&NtAuthority, 2, - SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, + SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &dropSids[0].Sid) || !AllocateAndInitializeSid(&NtAuthority, 2, - SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, + SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, 0, &dropSids[1].Sid)) { write_stderr(_("%s: could not allocate SIDs: error code %lu\n"), @@ -1968,7 +1968,7 @@ do_help(void) #endif printf(_(" -l, --log=FILENAME write (or append) server log to FILENAME\n")); printf(_(" -o, --options=OPTIONS command line options to pass to postgres\n" - " (PostgreSQL server executable) or initdb\n")); + " (PostgreSQL server executable) or initdb\n")); printf(_(" -p PATH-TO-POSTGRES normally not necessary\n")); printf(_("\nOptions for stop or restart:\n")); printf(_(" -m, --mode=MODE MODE can be \"smart\", \"fast\", or \"immediate\"\n")); diff --git a/src/bin/pg_dump/compress_io.c b/src/bin/pg_dump/compress_io.c index 025835a2e0d..991fe11e8a6 100644 --- a/src/bin/pg_dump/compress_io.c +++ b/src/bin/pg_dump/compress_io.c @@ -593,7 +593,7 @@ cfread(void *ptr, int size, cfp *fp) ret = gzread(fp->compressedfp, ptr, size); if (ret != size && !gzeof(fp->compressedfp)) exit_horribly(modulename, - "could not read from input file: %s\n", strerror(errno)); + "could not read from input file: %s\n", strerror(errno)); } else #endif @@ -629,10 +629,10 @@ cfgetc(cfp *fp) { if (!gzeof(fp->compressedfp)) exit_horribly(modulename, - "could not read from input file: %s\n", strerror(errno)); + "could not read from input file: %s\n", strerror(errno)); else exit_horribly(modulename, - "could not read from input file: end of file\n"); + "could not read from input file: end of file\n"); } } else diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 04159bcfc6c..dfc611848b0 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -177,7 +177,7 @@ buildACLCommands(const char *name, const char *subname, else if (strncmp(grantee->data, "group ", strlen("group ")) == 0) appendPQExpBuffer(firstsql, "GROUP %s;\n", - fmtId(grantee->data + strlen("group "))); + fmtId(grantee->data + strlen("group "))); else appendPQExpBuffer(firstsql, "%s;\n", fmtId(grantee->data)); @@ -185,14 +185,14 @@ buildACLCommands(const char *name, const char *subname, if (privswgo->len > 0) { appendPQExpBuffer(firstsql, - "%sREVOKE GRANT OPTION FOR %s ON %s %s FROM ", + "%sREVOKE GRANT OPTION FOR %s ON %s %s FROM ", prefix, privswgo->data, type, name); if (grantee->len == 0) appendPQExpBufferStr(firstsql, "PUBLIC"); else if (strncmp(grantee->data, "group ", strlen("group ")) == 0) appendPQExpBuffer(firstsql, "GROUP %s", - fmtId(grantee->data + strlen("group "))); + fmtId(grantee->data + strlen("group "))); else appendPQExpBufferStr(firstsql, fmtId(grantee->data)); } @@ -260,7 +260,7 @@ buildACLCommands(const char *name, const char *subname, fmtId(grantee->data)); if (privswgo->len > 0) appendPQExpBuffer(firstsql, - "%sGRANT %s ON %s %s TO %s WITH GRANT OPTION;\n", + "%sGRANT %s ON %s %s TO %s WITH GRANT OPTION;\n", prefix, privswgo->data, type, name, fmtId(grantee->data)); } @@ -291,7 +291,7 @@ buildACLCommands(const char *name, const char *subname, else if (strncmp(grantee->data, "group ", strlen("group ")) == 0) appendPQExpBuffer(secondsql, "GROUP %s;\n", - fmtId(grantee->data + strlen("group "))); + fmtId(grantee->data + strlen("group "))); else appendPQExpBuffer(secondsql, "%s;\n", fmtId(grantee->data)); } @@ -304,7 +304,7 @@ buildACLCommands(const char *name, const char *subname, else if (strncmp(grantee->data, "group ", strlen("group ")) == 0) appendPQExpBuffer(secondsql, "GROUP %s", - fmtId(grantee->data + strlen("group "))); + fmtId(grantee->data + strlen("group "))); else appendPQExpBufferStr(secondsql, fmtId(grantee->data)); appendPQExpBufferStr(secondsql, " WITH GRANT OPTION;\n"); @@ -764,16 +764,16 @@ buildACLQueries(PQExpBuffer acl_subquery, PQExpBuffer racl_subquery, "(SELECT pg_catalog.array_agg(acl) FROM " "(SELECT pg_catalog.unnest(pip.initprivs) AS acl " "EXCEPT " - "SELECT pg_catalog.unnest(pg_catalog.acldefault(%s,%s))) as foo) END", + "SELECT pg_catalog.unnest(pg_catalog.acldefault(%s,%s))) as foo) END", obj_kind, acl_owner); printfPQExpBuffer(init_racl_subquery, "CASE WHEN privtype = 'e' THEN " "(SELECT pg_catalog.array_agg(acl) FROM " - "(SELECT pg_catalog.unnest(pg_catalog.acldefault(%s,%s)) AS acl " + "(SELECT pg_catalog.unnest(pg_catalog.acldefault(%s,%s)) AS acl " "EXCEPT " - "SELECT pg_catalog.unnest(pip.initprivs)) as foo) END", + "SELECT pg_catalog.unnest(pip.initprivs)) as foo) END", obj_kind, acl_owner); } diff --git a/src/bin/pg_dump/parallel.c b/src/bin/pg_dump/parallel.c index 4452436d0ed..8ad51942ff2 100644 --- a/src/bin/pg_dump/parallel.c +++ b/src/bin/pg_dump/parallel.c @@ -1342,8 +1342,8 @@ lockTableForWorker(ArchiveHandle *AH, TocEntry *te) if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) exit_horribly(modulename, "could not obtain lock on relation \"%s\"\n" - "This usually means that someone requested an ACCESS EXCLUSIVE lock " - "on the table after the pg_dump parent process had gotten the " + "This usually means that someone requested an ACCESS EXCLUSIVE lock " + "on the table after the pg_dump parent process had gotten the " "initial ACCESS SHARE lock on the table.\n", qualId); PQclear(res); diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 35ff958ebac..c24a0f07e2e 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -572,7 +572,7 @@ RestoreArchive(Archive *AHX) char *mark; if (strcmp(te->desc, "CONSTRAINT") == 0 || - strcmp(te->desc, "CHECK CONSTRAINT") == 0 || + strcmp(te->desc, "CHECK CONSTRAINT") == 0 || strcmp(te->desc, "FK CONSTRAINT") == 0) strcpy(buffer, "DROP CONSTRAINT"); else @@ -1650,13 +1650,13 @@ dump_lo_buf(ArchiveHandle *AH) res = lo_write(AH->connection, AH->loFd, AH->lo_buf, AH->lo_buf_used); ahlog(AH, 5, ngettext("wrote %lu byte of large object data (result = %lu)\n", - "wrote %lu bytes of large object data (result = %lu)\n", + "wrote %lu bytes of large object data (result = %lu)\n", AH->lo_buf_used), (unsigned long) AH->lo_buf_used, (unsigned long) res); if (res != AH->lo_buf_used) exit_horribly(modulename, - "could not write to large object (result: %lu, expected: %lu)\n", - (unsigned long) res, (unsigned long) AH->lo_buf_used); + "could not write to large object (result: %lu, expected: %lu)\n", + (unsigned long) res, (unsigned long) AH->lo_buf_used); } else { @@ -1765,8 +1765,8 @@ warn_or_exit_horribly(ArchiveHandle *AH, { write_msg(modulename, "Error from TOC entry %d; %u %u %s %s %s\n", AH->currentTE->dumpId, - AH->currentTE->catalogId.tableoid, AH->currentTE->catalogId.oid, - AH->currentTE->desc, AH->currentTE->tag, AH->currentTE->owner); + AH->currentTE->catalogId.tableoid, AH->currentTE->catalogId.oid, + AH->currentTE->desc, AH->currentTE->tag, AH->currentTE->owner); } AH->lastErrorStage = AH->stage; AH->lastErrorTE = AH->currentTE; @@ -2559,7 +2559,7 @@ ReadToc(ArchiveHandle *AH) /* Sanity check */ if (te->dumpId <= 0) exit_horribly(modulename, - "entry ID %d out of range -- perhaps a corrupt TOC\n", + "entry ID %d out of range -- perhaps a corrupt TOC\n", te->dumpId); te->hadDumper = ReadInt(AH); @@ -2924,7 +2924,7 @@ _tocEntryRequired(TocEntry *te, teSection curSection, RestoreOptions *ropt) */ if (!(ropt->sequence_data && strcmp(te->desc, "SEQUENCE SET") == 0) && !(ropt->binary_upgrade && strcmp(te->desc, "BLOB") == 0) && - !(ropt->binary_upgrade && strncmp(te->tag, "LARGE OBJECT ", 13) == 0)) + !(ropt->binary_upgrade && strncmp(te->tag, "LARGE OBJECT ", 13) == 0)) res = res & REQ_SCHEMA; } @@ -3270,8 +3270,8 @@ _selectTablespace(ArchiveHandle *AH, const char *tablespace) if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) warn_or_exit_horribly(AH, modulename, - "could not set default_tablespace to %s: %s", - fmtId(want), PQerrorMessage(AH->connection)); + "could not set default_tablespace to %s: %s", + fmtId(want), PQerrorMessage(AH->connection)); PQclear(res); } diff --git a/src/bin/pg_dump/pg_backup_custom.c b/src/bin/pg_dump/pg_backup_custom.c index 810ff6b1807..3da00403a15 100644 --- a/src/bin/pg_dump/pg_backup_custom.c +++ b/src/bin/pg_dump/pg_backup_custom.c @@ -476,7 +476,7 @@ _PrintTocData(ArchiveHandle *AH, TocEntry *te) else if (!ctx->hasSeek) exit_horribly(modulename, "could not find block ID %d in archive -- " "possibly due to out-of-order restore request, " - "which cannot be handled due to non-seekable input file\n", + "which cannot be handled due to non-seekable input file\n", te->dumpId); else /* huh, the dataPos led us to EOF? */ exit_horribly(modulename, "could not find block ID %d in archive -- " @@ -581,10 +581,10 @@ _skipData(ArchiveHandle *AH) { if (feof(AH->FH)) exit_horribly(modulename, - "could not read from input file: end of file\n"); + "could not read from input file: end of file\n"); else exit_horribly(modulename, - "could not read from input file: %s\n", strerror(errno)); + "could not read from input file: %s\n", strerror(errno)); } ctx->filePos += blkLen; diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c index b01a5f0cf0e..befcde46306 100644 --- a/src/bin/pg_dump/pg_backup_db.c +++ b/src/bin/pg_dump/pg_backup_db.c @@ -631,7 +631,7 @@ EndDBCopyMode(Archive *AHX, const char *tocEntryTag) res = PQgetResult(AH->connection); if (PQresultStatus(res) != PGRES_COMMAND_OK) warn_or_exit_horribly(AH, modulename, "COPY failed for table \"%s\": %s", - tocEntryTag, PQerrorMessage(AH->connection)); + tocEntryTag, PQerrorMessage(AH->connection)); PQclear(res); /* Do this to ensure we've pumped libpq back to idle state */ diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index 22ff8413d37..f839712945f 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -178,7 +178,7 @@ InitArchiveFmt_Tar(ArchiveHandle *AH) ctx->tarFH = fopen(AH->fSpec, PG_BINARY_W); if (ctx->tarFH == NULL) exit_horribly(modulename, - "could not open TOC file \"%s\" for output: %s\n", + "could not open TOC file \"%s\" for output: %s\n", AH->fSpec, strerror(errno)); } else @@ -207,7 +207,7 @@ InitArchiveFmt_Tar(ArchiveHandle *AH) */ if (AH->compression != 0) exit_horribly(modulename, - "compression is not supported by tar archive format\n"); + "compression is not supported by tar archive format\n"); } else { /* Read Mode */ @@ -556,7 +556,7 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh) res = GZREAD(&((char *) buf)[used], 1, len, th->zFH); if (res != len && !GZEOF(th->zFH)) exit_horribly(modulename, - "could not read from input file: %s\n", strerror(errno)); + "could not read from input file: %s\n", strerror(errno)); } else { @@ -1235,7 +1235,7 @@ _tarGetHeader(ArchiveHandle *AH, TAR_MEMBER *th) if (len != 512) exit_horribly(modulename, ngettext("incomplete tar header found (%lu byte)\n", - "incomplete tar header found (%lu bytes)\n", + "incomplete tar header found (%lu bytes)\n", len), (unsigned long) len); diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index e03fdebecb2..ec349d4192c 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -253,9 +253,9 @@ static void dumpDatabase(Archive *AH); static void dumpEncoding(Archive *AH); static void dumpStdStrings(Archive *AH); static void binary_upgrade_set_type_oids_by_type_oid(Archive *fout, - PQExpBuffer upgrade_buffer, Oid pg_type_oid); + PQExpBuffer upgrade_buffer, Oid pg_type_oid); static bool binary_upgrade_set_type_oids_by_rel_oid(Archive *fout, - PQExpBuffer upgrade_buffer, Oid pg_rel_oid); + PQExpBuffer upgrade_buffer, Oid pg_rel_oid); static void binary_upgrade_set_pg_class_oids(Archive *fout, PQExpBuffer upgrade_buffer, Oid pg_class_oid, bool is_index); @@ -692,14 +692,14 @@ main(int argc, char **argv) if (numWorkers > 1 && fout->remoteVersion < 90200 && !dopt.no_synchronized_snapshots) exit_horribly(NULL, - "Synchronized snapshots are not supported by this server version.\n" - "Run with --no-synchronized-snapshots instead if you do not need\n" + "Synchronized snapshots are not supported by this server version.\n" + "Run with --no-synchronized-snapshots instead if you do not need\n" "synchronized snapshots.\n"); /* check the version when a snapshot is explicitly specified by user */ if (dumpsnapshot && fout->remoteVersion < 90200) exit_horribly(NULL, - "Exported snapshots are not supported by this server version.\n"); + "Exported snapshots are not supported by this server version.\n"); /* * Find the last built-in OID, if needed (prior to 8.1) @@ -708,7 +708,7 @@ main(int argc, char **argv) */ if (fout->remoteVersion < 80100) g_last_builtin_oid = findLastBuiltinOid_V71(fout, - PQdb(GetConnection(fout))); + PQdb(GetConnection(fout))); else g_last_builtin_oid = FirstNormalObjectId - 1; @@ -963,7 +963,7 @@ help(const char *progname) printf(_(" --serializable-deferrable wait until the dump can run without anomalies\n")); printf(_(" --snapshot=SNAPSHOT use given snapshot for the dump\n")); printf(_(" --strict-names require table and/or schema include patterns to\n" - " match at least one entity each\n")); + " match at least one entity each\n")); printf(_(" --use-set-session-authorization\n" " use SET SESSION AUTHORIZATION commands instead of\n" " ALTER OWNER commands to set ownership\n")); @@ -1133,7 +1133,7 @@ setup_connection(Archive *AH, const char *dumpencoding, { if (AH->isStandby) exit_horribly(NULL, - "Synchronized snapshots are not supported on standby servers.\n" + "Synchronized snapshots are not supported on standby servers.\n" "Run with --no-synchronized-snapshots instead if you do not need\n" "synchronized snapshots.\n"); @@ -1283,8 +1283,8 @@ expand_table_name_patterns(Archive *fout, appendPQExpBuffer(query, "SELECT c.oid" "\nFROM pg_catalog.pg_class c" - "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace" - "\nWHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c')\n", + "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace" + "\nWHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c')\n", RELKIND_RELATION, RELKIND_SEQUENCE, RELKIND_VIEW, RELKIND_MATVIEW, RELKIND_FOREIGN_TABLE, RELKIND_PARTITIONED_TABLE); @@ -2051,7 +2051,7 @@ dumpTableData(Archive *fout, TableDataInfo *tdinfo) fmtId(tbinfo->dobj.name)); appendPQExpBuffer(copyBuf, "%s %sFROM stdin;\n", fmtCopyColumnList(tbinfo, clistBuf), - (tdinfo->oids && tbinfo->hasoids) ? "WITH OIDS " : ""); + (tdinfo->oids && tbinfo->hasoids) ? "WITH OIDS " : ""); copyStmt = copyBuf->data; } else @@ -2234,30 +2234,30 @@ buildMatViewRefreshDependencies(Archive *fout) appendPQExpBufferStr(query, "WITH RECURSIVE w AS " "( " - "SELECT d1.objid, d2.refobjid, c2.relkind AS refrelkind " + "SELECT d1.objid, d2.refobjid, c2.relkind AS refrelkind " "FROM pg_depend d1 " "JOIN pg_class c1 ON c1.oid = d1.objid " "AND c1.relkind = " CppAsString2(RELKIND_MATVIEW) " JOIN pg_rewrite r1 ON r1.ev_class = d1.objid " - "JOIN pg_depend d2 ON d2.classid = 'pg_rewrite'::regclass " + "JOIN pg_depend d2 ON d2.classid = 'pg_rewrite'::regclass " "AND d2.objid = r1.oid " "AND d2.refobjid <> d1.objid " "JOIN pg_class c2 ON c2.oid = d2.refobjid " - "AND c2.relkind IN (" CppAsString2(RELKIND_MATVIEW) "," + "AND c2.relkind IN (" CppAsString2(RELKIND_MATVIEW) "," CppAsString2(RELKIND_VIEW) ") " "WHERE d1.classid = 'pg_class'::regclass " "UNION " "SELECT w.objid, d3.refobjid, c3.relkind " "FROM w " "JOIN pg_rewrite r3 ON r3.ev_class = w.refobjid " - "JOIN pg_depend d3 ON d3.classid = 'pg_rewrite'::regclass " + "JOIN pg_depend d3 ON d3.classid = 'pg_rewrite'::regclass " "AND d3.objid = r3.oid " "AND d3.refobjid <> w.refobjid " "JOIN pg_class c3 ON c3.oid = d3.refobjid " - "AND c3.relkind IN (" CppAsString2(RELKIND_MATVIEW) "," + "AND c3.relkind IN (" CppAsString2(RELKIND_MATVIEW) "," CppAsString2(RELKIND_VIEW) ") " ") " - "SELECT 'pg_class'::regclass::oid AS classid, objid, refobjid " + "SELECT 'pg_class'::regclass::oid AS classid, objid, refobjid " "FROM w " "WHERE refrelkind = " CppAsString2(RELKIND_MATVIEW)); @@ -2491,7 +2491,7 @@ dumpDatabase(Archive *fout) "pg_encoding_to_char(encoding) AS encoding, " "datcollate, datctype, datfrozenxid, datminmxid, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = dattablespace) AS tablespace, " - "shobj_description(oid, 'pg_database') AS description " + "shobj_description(oid, 'pg_database') AS description " "FROM pg_database " "WHERE datname = ", @@ -2503,9 +2503,9 @@ dumpDatabase(Archive *fout) appendPQExpBuffer(dbQry, "SELECT tableoid, oid, " "(%s datdba) AS dba, " "pg_encoding_to_char(encoding) AS encoding, " - "datcollate, datctype, datfrozenxid, 0 AS datminmxid, " + "datcollate, datctype, datfrozenxid, 0 AS datminmxid, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = dattablespace) AS tablespace, " - "shobj_description(oid, 'pg_database') AS description " + "shobj_description(oid, 'pg_database') AS description " "FROM pg_database " "WHERE datname = ", @@ -2519,7 +2519,7 @@ dumpDatabase(Archive *fout) "pg_encoding_to_char(encoding) AS encoding, " "NULL AS datcollate, NULL AS datctype, datfrozenxid, 0 AS datminmxid, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = dattablespace) AS tablespace, " - "shobj_description(oid, 'pg_database') AS description " + "shobj_description(oid, 'pg_database') AS description " "FROM pg_database " "WHERE datname = ", @@ -3193,7 +3193,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables) "SELECT oid, tableoid, pol.polname, pol.polcmd, pol.polpermissive, " "CASE WHEN pol.polroles = '{0}' THEN NULL ELSE " " pg_catalog.array_to_string(ARRAY(SELECT pg_catalog.quote_ident(rolname) from pg_catalog.pg_roles WHERE oid = ANY(pol.polroles)), ', ') END AS polroles, " - "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, " + "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, " "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck " "FROM pg_catalog.pg_policy pol " "WHERE polrelid = '%u'", @@ -3203,7 +3203,7 @@ getPolicies(Archive *fout, TableInfo tblinfo[], int numTables) "SELECT oid, tableoid, pol.polname, pol.polcmd, 't' as polpermissive, " "CASE WHEN pol.polroles = '{0}' THEN NULL ELSE " " pg_catalog.array_to_string(ARRAY(SELECT pg_catalog.quote_ident(rolname) from pg_catalog.pg_roles WHERE oid = ANY(pol.polroles)), ', ') END AS polroles, " - "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, " + "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid) AS polqual, " "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid) AS polwithcheck " "FROM pg_catalog.pg_policy pol " "WHERE polrelid = '%u'", @@ -3714,8 +3714,8 @@ getSubscriptions(Archive *fout) res = ExecuteSqlQuery(fout, "SELECT count(*) FROM pg_subscription " - "WHERE subdbid = (SELECT oid FROM pg_catalog.pg_database" - " WHERE datname = current_database())", + "WHERE subdbid = (SELECT oid FROM pg_catalog.pg_database" + " WHERE datname = current_database())", PGRES_TUPLES_OK); n = atoi(PQgetvalue(res, 0, 0)); if (n > 0) @@ -3735,8 +3735,8 @@ getSubscriptions(Archive *fout) " s.subconninfo, s.subslotname, s.subsynccommit, " " s.subpublications " "FROM pg_catalog.pg_subscription s " - "WHERE s.subdbid = (SELECT oid FROM pg_catalog.pg_database" - " WHERE datname = current_database())", + "WHERE s.subdbid = (SELECT oid FROM pg_catalog.pg_database" + " WHERE datname = current_database())", username_subquery); res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK); @@ -3902,7 +3902,7 @@ binary_upgrade_set_type_oids_by_type_oid(Archive *fout, if (OidIsValid(pg_type_array_oid)) { appendPQExpBufferStr(upgrade_buffer, - "\n-- For binary upgrade, must preserve pg_type array oid\n"); + "\n-- For binary upgrade, must preserve pg_type array oid\n"); appendPQExpBuffer(upgrade_buffer, "SELECT pg_catalog.binary_upgrade_set_next_array_pg_type_oid('%u'::pg_catalog.oid);\n\n", pg_type_array_oid); @@ -3942,7 +3942,7 @@ binary_upgrade_set_type_oids_by_rel_oid(Archive *fout, { /* Toast tables do not have pg_type array rows */ Oid pg_type_toast_oid = atooid(PQgetvalue(upgrade_res, 0, - PQfnumber(upgrade_res, "trel"))); + PQfnumber(upgrade_res, "trel"))); appendPQExpBufferStr(upgrade_buffer, "\n-- For binary upgrade, must preserve pg_type toast oid\n"); appendPQExpBuffer(upgrade_buffer, @@ -3981,7 +3981,7 @@ binary_upgrade_set_pg_class_oids(Archive *fout, pg_index_indexrelid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "indexrelid"))); appendPQExpBufferStr(upgrade_buffer, - "\n-- For binary upgrade, must preserve pg_class oids\n"); + "\n-- For binary upgrade, must preserve pg_class oids\n"); if (!is_index) { @@ -4053,7 +4053,7 @@ binary_upgrade_extension_member(PQExpBuffer upgrade_buffer, exit_horribly(NULL, "could not find parent extension for %s\n", objlabel); appendPQExpBufferStr(upgrade_buffer, - "\n-- For binary upgrade, handle extension membership the hard way\n"); + "\n-- For binary upgrade, handle extension membership the hard way\n"); appendPQExpBuffer(upgrade_buffer, "ALTER EXTENSION %s ADD %s;\n", fmtId(extobj->name), objlabel); @@ -5174,7 +5174,7 @@ getAggregates(Archive *fout, int *numAggs) "FROM pg_proc " "WHERE proisagg " "AND pronamespace != " - "(SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog')", + "(SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog')", username_subquery); } @@ -5349,13 +5349,13 @@ getFuncs(Archive *fout, int *numFuncs) g_last_builtin_oid); if (dopt->binary_upgrade) appendPQExpBufferStr(query, - "\n OR EXISTS(SELECT 1 FROM pg_depend WHERE " + "\n OR EXISTS(SELECT 1 FROM pg_depend WHERE " "classid = 'pg_proc'::regclass AND " "objid = p.oid AND " "refclassid = 'pg_extension'::regclass AND " "deptype = 'e')"); appendPQExpBufferStr(query, - "\n OR p.proacl IS DISTINCT FROM pip.initprivs"); + "\n OR p.proacl IS DISTINCT FROM pip.initprivs"); appendPQExpBufferChar(query, ')'); destroyPQExpBuffer(acl_subquery); @@ -5377,7 +5377,7 @@ getFuncs(Archive *fout, int *numFuncs) username_subquery); if (fout->remoteVersion >= 90200) appendPQExpBufferStr(query, - "\n AND NOT EXISTS (SELECT 1 FROM pg_depend " + "\n AND NOT EXISTS (SELECT 1 FROM pg_depend " "WHERE classid = 'pg_proc'::regclass AND " "objid = p.oid AND deptype = 'i')"); appendPQExpBuffer(query, @@ -5400,7 +5400,7 @@ getFuncs(Archive *fout, int *numFuncs) if (dopt->binary_upgrade && fout->remoteVersion >= 90100) appendPQExpBufferStr(query, - "\n OR EXISTS(SELECT 1 FROM pg_depend WHERE " + "\n OR EXISTS(SELECT 1 FROM pg_depend WHERE " "classid = 'pg_proc'::regclass AND " "objid = p.oid AND " "refclassid = 'pg_extension'::regclass AND " @@ -5468,7 +5468,7 @@ getFuncs(Archive *fout, int *numFuncs) if (strlen(finfo[i].rolname) == 0) write_msg(NULL, - "WARNING: owner of function \"%s\" appears to be invalid\n", + "WARNING: owner of function \"%s\" appears to be invalid\n", finfo[i].dobj.name); } @@ -5595,12 +5595,12 @@ getTables(Archive *fout, int *numTables) buildACLQueries(acl_subquery, racl_subquery, initacl_subquery, initracl_subquery, "c.relacl", "c.relowner", - "CASE WHEN c.relkind = " CppAsString2(RELKIND_SEQUENCE) + "CASE WHEN c.relkind = " CppAsString2(RELKIND_SEQUENCE) " THEN 's' ELSE 'r' END::\"char\"", dopt->binary_upgrade); buildACLQueries(attacl_subquery, attracl_subquery, attinitacl_subquery, - attinitracl_subquery, "at.attacl", "c.relowner", "'c'", + attinitracl_subquery, "at.attacl", "c.relowner", "'c'", dopt->binary_upgrade); appendPQExpBuffer(query, @@ -5645,13 +5645,13 @@ getTables(Archive *fout, int *numTables) "(c.relkind = '%c' AND " "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " - "d.refclassid = c.tableoid AND d.deptype IN ('a', 'i')) " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "d.refclassid = c.tableoid AND d.deptype IN ('a', 'i')) " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " "LEFT JOIN pg_init_privs pip ON " "(c.oid = pip.objoid " "AND pip.classoid = 'pg_class'::regclass " "AND pip.objsubid = 0) " - "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c', '%c') " + "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c', '%c') " "ORDER BY c.oid", acl_subquery->data, racl_subquery->data, @@ -5721,8 +5721,8 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " - "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, RELKIND_SEQUENCE, @@ -5770,8 +5770,8 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " - "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, RELKIND_SEQUENCE, @@ -5819,8 +5819,8 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " - "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, RELKIND_SEQUENCE, @@ -5866,8 +5866,8 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " - "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "WHERE c.relkind in ('%c', '%c', '%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, RELKIND_SEQUENCE, @@ -5913,7 +5913,7 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " "WHERE c.relkind in ('%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, @@ -5959,7 +5959,7 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " "WHERE c.relkind in ('%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, @@ -5980,7 +5980,7 @@ getTables(Archive *fout, int *numTables) "c.relkind, " "c.relnamespace, " "(%s c.relowner) AS rolname, " - "c.relchecks, (c.reltriggers <> 0) AS relhastriggers, " + "c.relchecks, (c.reltriggers <> 0) AS relhastriggers, " "c.relhasindex, c.relhasrules, c.relhasoids, " "'f'::bool AS relrowsecurity, " "'f'::bool AS relforcerowsecurity, " @@ -6005,7 +6005,7 @@ getTables(Archive *fout, int *numTables) "d.classid = c.tableoid AND d.objid = c.oid AND " "d.objsubid = 0 AND " "d.refclassid = c.tableoid AND d.deptype = 'a') " - "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " + "LEFT JOIN pg_class tc ON (c.reltoastrelid = tc.oid) " "WHERE c.relkind in ('%c', '%c', '%c', '%c') " "ORDER BY c.oid", username_subquery, @@ -6213,7 +6213,7 @@ getTables(Archive *fout, int *numTables) tblinfo[i].postponed_def = false; /* might get set during sort */ tblinfo[i].is_identity_sequence = (i_is_identity_sequence >= 0 && - strcmp(PQgetvalue(res, i, i_is_identity_sequence), "t") == 0); + strcmp(PQgetvalue(res, i, i_is_identity_sequence), "t") == 0); /* Partition key string or NULL */ tblinfo[i].partkeydef = pg_strdup(PQgetvalue(res, i, i_partkeydef)); @@ -6243,7 +6243,7 @@ getTables(Archive *fout, int *numTables) appendPQExpBuffer(query, "LOCK TABLE %s IN ACCESS SHARE MODE", fmtQualifiedId(fout->remoteVersion, - tblinfo[i].dobj.namespace->dobj.name, + tblinfo[i].dobj.namespace->dobj.name, tblinfo[i].dobj.name)); ExecuteSqlStatement(fout, query->data); } @@ -6451,7 +6451,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) appendPQExpBuffer(query, "SELECT t.tableoid, t.oid, " "t.relname AS indexname, " - "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " + "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "i.indisreplident, t.relpages, " @@ -6459,11 +6459,11 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "c.condeferrable, c.condeferred, " "c.tableoid AS contableoid, " "c.oid AS conoid, " - "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " + "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " - "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " + "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_constraint c " "ON (i.indrelid = c.conrelid AND " "i.indexrelid = c.conindid AND " @@ -6482,7 +6482,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) appendPQExpBuffer(query, "SELECT t.tableoid, t.oid, " "t.relname AS indexname, " - "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " + "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " @@ -6490,11 +6490,11 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "c.condeferrable, c.condeferred, " "c.tableoid AS contableoid, " "c.oid AS conoid, " - "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " + "pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, " "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " - "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " + "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_constraint c " "ON (i.indrelid = c.conrelid AND " "i.indexrelid = c.conindid AND " @@ -6509,7 +6509,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) appendPQExpBuffer(query, "SELECT t.tableoid, t.oid, " "t.relname AS indexname, " - "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " + "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " @@ -6521,7 +6521,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " "t.reloptions AS indreloptions " "FROM pg_catalog.pg_index i " - "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " + "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_depend d " "ON (d.classid = t.tableoid " "AND d.objid = t.oid " @@ -6539,7 +6539,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) appendPQExpBuffer(query, "SELECT t.tableoid, t.oid, " "t.relname AS indexname, " - "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " + "pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, " "t.relnatts AS indnkeys, " "i.indkey, i.indisclustered, " "false AS indisreplident, t.relpages, " @@ -6551,7 +6551,7 @@ getIndexes(Archive *fout, TableInfo tblinfo[], int numTables) "(SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, " "null AS indreloptions " "FROM pg_catalog.pg_index i " - "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " + "JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) " "LEFT JOIN pg_catalog.pg_depend d " "ON (d.classid = t.tableoid " "AND d.objid = t.oid " @@ -7115,7 +7115,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables) appendPQExpBuffer(query, "SELECT tgname, " "tgfoid::pg_catalog.regproc AS tgfname, " - "pg_catalog.pg_get_triggerdef(oid, false) AS tgdef, " + "pg_catalog.pg_get_triggerdef(oid, false) AS tgdef, " "tgenabled, tableoid, oid " "FROM pg_catalog.pg_trigger t " "WHERE tgrelid = '%u'::pg_catalog.oid " @@ -7133,7 +7133,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables) "tgtype, tgnargs, tgargs, tgenabled, " "tgisconstraint, tgconstrname, tgdeferrable, " "tgconstrrelid, tginitdeferred, tableoid, oid, " - "tgconstrrelid::pg_catalog.regclass AS tgconstrrelname " + "tgconstrrelid::pg_catalog.regclass AS tgconstrrelname " "FROM pg_catalog.pg_trigger t " "WHERE tgrelid = '%u'::pg_catalog.oid " "AND tgconstraint = 0", @@ -7152,7 +7152,7 @@ getTriggers(Archive *fout, TableInfo tblinfo[], int numTables) "tgtype, tgnargs, tgargs, tgenabled, " "tgisconstraint, tgconstrname, tgdeferrable, " "tgconstrrelid, tginitdeferred, tableoid, oid, " - "tgconstrrelid::pg_catalog.regclass AS tgconstrrelname " + "tgconstrrelid::pg_catalog.regclass AS tgconstrrelname " "FROM pg_catalog.pg_trigger t " "WHERE tgrelid = '%u'::pg_catalog.oid " "AND (NOT tgisconstraint " @@ -7566,7 +7566,7 @@ getCasts(Archive *fout, int *numCasts) { appendPQExpBufferStr(query, "SELECT tableoid, oid, " "castsource, casttarget, castfunc, castcontext, " - "CASE WHEN castfunc = 0 THEN 'b' ELSE 'f' END AS castmethod " + "CASE WHEN castfunc = 0 THEN 'b' ELSE 'f' END AS castmethod " "FROM pg_cast ORDER BY 3,4"); } @@ -7820,18 +7820,18 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) "a.attstattarget, a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " - "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " - "array_to_string(a.attoptions, ', ') AS attoptions, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " + "array_to_string(a.attoptions, ', ') AS attoptions, " "CASE WHEN a.attcollation <> t.typcollation " - "THEN a.attcollation ELSE 0 END AS attcollation, " + "THEN a.attcollation ELSE 0 END AS attcollation, " "a.attidentity, " "pg_catalog.array_to_string(ARRAY(" "SELECT pg_catalog.quote_ident(option_name) || " "' ' || pg_catalog.quote_literal(option_value) " - "FROM pg_catalog.pg_options_to_table(attfdwoptions) " + "FROM pg_catalog.pg_options_to_table(attfdwoptions) " "ORDER BY option_name" "), E',\n ') AS attfdwoptions " - "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " "ON a.atttypid = t.oid " "WHERE a.attrelid = '%u'::pg_catalog.oid " "AND a.attnum > 0::pg_catalog.int2 " @@ -7847,17 +7847,17 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) "a.attstattarget, a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " - "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " - "array_to_string(a.attoptions, ', ') AS attoptions, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " + "array_to_string(a.attoptions, ', ') AS attoptions, " "CASE WHEN a.attcollation <> t.typcollation " - "THEN a.attcollation ELSE 0 END AS attcollation, " + "THEN a.attcollation ELSE 0 END AS attcollation, " "pg_catalog.array_to_string(ARRAY(" "SELECT pg_catalog.quote_ident(option_name) || " "' ' || pg_catalog.quote_literal(option_value) " - "FROM pg_catalog.pg_options_to_table(attfdwoptions) " + "FROM pg_catalog.pg_options_to_table(attfdwoptions) " "ORDER BY option_name" "), E',\n ') AS attfdwoptions " - "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " "ON a.atttypid = t.oid " "WHERE a.attrelid = '%u'::pg_catalog.oid " "AND a.attnum > 0::pg_catalog.int2 " @@ -7876,12 +7876,12 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) "a.attstattarget, a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " - "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " - "array_to_string(a.attoptions, ', ') AS attoptions, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " + "array_to_string(a.attoptions, ', ') AS attoptions, " "CASE WHEN a.attcollation <> t.typcollation " - "THEN a.attcollation ELSE 0 END AS attcollation, " + "THEN a.attcollation ELSE 0 END AS attcollation, " "NULL AS attfdwoptions " - "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " "ON a.atttypid = t.oid " "WHERE a.attrelid = '%u'::pg_catalog.oid " "AND a.attnum > 0::pg_catalog.int2 " @@ -7895,11 +7895,11 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) "a.attstattarget, a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " - "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " - "array_to_string(a.attoptions, ', ') AS attoptions, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " + "array_to_string(a.attoptions, ', ') AS attoptions, " "0 AS attcollation, " "NULL AS attfdwoptions " - "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " "ON a.atttypid = t.oid " "WHERE a.attrelid = '%u'::pg_catalog.oid " "AND a.attnum > 0::pg_catalog.int2 " @@ -7913,10 +7913,10 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) "a.attstattarget, a.attstorage, t.typstorage, " "a.attnotnull, a.atthasdef, a.attisdropped, " "a.attlen, a.attalign, a.attislocal, " - "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " + "pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, " "'' AS attoptions, 0 AS attcollation, " "NULL AS attfdwoptions " - "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " + "FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t " "ON a.atttypid = t.oid " "WHERE a.attrelid = '%u'::pg_catalog.oid " "AND a.attnum > 0::pg_catalog.int2 " @@ -8011,7 +8011,7 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) tbinfo->dobj.name); printfPQExpBuffer(q, "SELECT tableoid, oid, adnum, " - "pg_catalog.pg_get_expr(adbin, adrelid) AS adsrc " + "pg_catalog.pg_get_expr(adbin, adrelid) AS adsrc " "FROM pg_catalog.pg_attrdef " "WHERE adrelid = '%u'::pg_catalog.oid", tbinfo->dobj.catId.oid); @@ -8107,7 +8107,7 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) * but it wasn't ever false for check constraints until 9.2). */ appendPQExpBuffer(q, "SELECT tableoid, oid, conname, " - "pg_catalog.pg_get_constraintdef(oid) AS consrc, " + "pg_catalog.pg_get_constraintdef(oid) AS consrc, " "conislocal, convalidated " "FROM pg_catalog.pg_constraint " "WHERE conrelid = '%u'::pg_catalog.oid " @@ -8119,7 +8119,7 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) { /* conislocal is new in 8.4 */ appendPQExpBuffer(q, "SELECT tableoid, oid, conname, " - "pg_catalog.pg_get_constraintdef(oid) AS consrc, " + "pg_catalog.pg_get_constraintdef(oid) AS consrc, " "conislocal, true AS convalidated " "FROM pg_catalog.pg_constraint " "WHERE conrelid = '%u'::pg_catalog.oid " @@ -8130,7 +8130,7 @@ getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables) else { appendPQExpBuffer(q, "SELECT tableoid, oid, conname, " - "pg_catalog.pg_get_constraintdef(oid) AS consrc, " + "pg_catalog.pg_get_constraintdef(oid) AS consrc, " "true AS conislocal, true AS convalidated " "FROM pg_catalog.pg_constraint " "WHERE conrelid = '%u'::pg_catalog.oid " @@ -8641,7 +8641,7 @@ getForeignDataWrappers(Archive *fout, int *numForeignDataWrappers) "FROM pg_foreign_data_wrapper f " "LEFT JOIN pg_init_privs pip ON " "(f.oid = pip.objoid " - "AND pip.classoid = 'pg_foreign_data_wrapper'::regclass " + "AND pip.classoid = 'pg_foreign_data_wrapper'::regclass " "AND pip.objsubid = 0) ", username_subquery, acl_subquery->data, @@ -9607,7 +9607,7 @@ dumpExtension(Archive *fout, ExtensionInfo *extinfo) appendPQExpBuffer(q, "DROP EXTENSION IF EXISTS %s;\n", qextname); appendPQExpBufferStr(q, - "SELECT pg_catalog.binary_upgrade_create_empty_extension("); + "SELECT pg_catalog.binary_upgrade_create_empty_extension("); appendStringLiteralAH(q, extinfo->dobj.name, fout); appendPQExpBufferStr(q, ", "); appendStringLiteralAH(q, extinfo->namespace, fout); @@ -9870,7 +9870,7 @@ dumpRangeType(Archive *fout, TypeInfo *tyinfo) selectSourceSchema(fout, tyinfo->dobj.namespace->dobj.name); appendPQExpBuffer(query, - "SELECT pg_catalog.format_type(rngsubtype, NULL) AS rngsubtype, " + "SELECT pg_catalog.format_type(rngsubtype, NULL) AS rngsubtype, " "opc.opcname AS opcname, " "(SELECT nspname FROM pg_catalog.pg_namespace nsp " " WHERE nsp.oid = opc.opcnamespace) AS opcnsp, " @@ -10375,20 +10375,20 @@ dumpDomain(Archive *fout, TypeInfo *tyinfo) { /* typcollation is new in 9.1 */ appendPQExpBuffer(query, "SELECT t.typnotnull, " - "pg_catalog.format_type(t.typbasetype, t.typtypmod) AS typdefn, " + "pg_catalog.format_type(t.typbasetype, t.typtypmod) AS typdefn, " "pg_catalog.pg_get_expr(t.typdefaultbin, 'pg_catalog.pg_type'::pg_catalog.regclass) AS typdefaultbin, " "t.typdefault, " "CASE WHEN t.typcollation <> u.typcollation " "THEN t.typcollation ELSE 0 END AS typcollation " "FROM pg_catalog.pg_type t " - "LEFT JOIN pg_catalog.pg_type u ON (t.typbasetype = u.oid) " + "LEFT JOIN pg_catalog.pg_type u ON (t.typbasetype = u.oid) " "WHERE t.oid = '%u'::pg_catalog.oid", tyinfo->dobj.catId.oid); } else { appendPQExpBuffer(query, "SELECT typnotnull, " - "pg_catalog.format_type(typbasetype, typtypmod) AS typdefn, " + "pg_catalog.format_type(typbasetype, typtypmod) AS typdefn, " "pg_catalog.pg_get_expr(typdefaultbin, 'pg_catalog.pg_type'::pg_catalog.regclass) AS typdefaultbin, " "typdefault, 0 AS typcollation " "FROM pg_catalog.pg_type " @@ -10573,13 +10573,13 @@ dumpCompositeType(Archive *fout, TypeInfo *tyinfo) * collation does not matter for those. */ appendPQExpBuffer(query, "SELECT a.attname, " - "pg_catalog.format_type(a.atttypid, a.atttypmod) AS atttypdefn, " + "pg_catalog.format_type(a.atttypid, a.atttypmod) AS atttypdefn, " "a.attlen, a.attalign, a.attisdropped, " "CASE WHEN a.attcollation <> at.typcollation " "THEN a.attcollation ELSE 0 END AS attcollation " "FROM pg_catalog.pg_type ct " - "JOIN pg_catalog.pg_attribute a ON a.attrelid = ct.typrelid " - "LEFT JOIN pg_catalog.pg_type at ON at.oid = a.atttypid " + "JOIN pg_catalog.pg_attribute a ON a.attrelid = ct.typrelid " + "LEFT JOIN pg_catalog.pg_type at ON at.oid = a.atttypid " "WHERE ct.oid = '%u'::pg_catalog.oid " "ORDER BY a.attnum ", tyinfo->dobj.catId.oid); @@ -10591,10 +10591,10 @@ dumpCompositeType(Archive *fout, TypeInfo *tyinfo) * should always be false. */ appendPQExpBuffer(query, "SELECT a.attname, " - "pg_catalog.format_type(a.atttypid, a.atttypmod) AS atttypdefn, " + "pg_catalog.format_type(a.atttypid, a.atttypmod) AS atttypdefn, " "a.attlen, a.attalign, a.attisdropped, " "0 AS attcollation " - "FROM pg_catalog.pg_type ct, pg_catalog.pg_attribute a " + "FROM pg_catalog.pg_type ct, pg_catalog.pg_attribute a " "WHERE ct.oid = '%u'::pg_catalog.oid " "AND a.attrelid = ct.typrelid " "ORDER BY a.attnum ", @@ -10680,7 +10680,7 @@ dumpCompositeType(Archive *fout, TypeInfo *tyinfo) /* stash separately for insertion after the CREATE TYPE */ appendPQExpBufferStr(dropped, - "\n-- For binary upgrade, recreate dropped column.\n"); + "\n-- For binary upgrade, recreate dropped column.\n"); appendPQExpBuffer(dropped, "UPDATE pg_catalog.pg_attribute\n" "SET attlen = %s, " "attalign = '%s', attbyval = false\n" @@ -10890,7 +10890,7 @@ dumpShellType(Archive *fout, ShellTypeInfo *stinfo) if (dopt->binary_upgrade) binary_upgrade_set_type_oids_by_type_oid(fout, q, - stinfo->baseType->dobj.catId.oid); + stinfo->baseType->dobj.catId.oid); appendPQExpBuffer(q, "CREATE TYPE %s;\n", fmtId(stinfo->dobj.name)); @@ -10999,7 +10999,7 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang) /* Cope with possibility that inline is in different schema */ if (inlineInfo->dobj.namespace != funcInfo->dobj.namespace) appendPQExpBuffer(defqry, "%s.", - fmtId(inlineInfo->dobj.namespace->dobj.name)); + fmtId(inlineInfo->dobj.namespace->dobj.name)); appendPQExpBufferStr(defqry, fmtId(inlineInfo->dobj.name)); } if (OidIsValid(plang->lanvalidator)) @@ -11008,7 +11008,7 @@ dumpProcLang(Archive *fout, ProcLangInfo *plang) /* Cope with possibility that validator is in different schema */ if (validatorInfo->dobj.namespace != funcInfo->dobj.namespace) appendPQExpBuffer(defqry, "%s.", - fmtId(validatorInfo->dobj.namespace->dobj.name)); + fmtId(validatorInfo->dobj.namespace->dobj.name)); appendPQExpBufferStr(defqry, fmtId(validatorInfo->dobj.name)); } } @@ -11264,9 +11264,9 @@ dumpFunc(Archive *fout, FuncInfo *finfo) */ appendPQExpBuffer(query, "SELECT proretset, prosrc, probin, " - "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " - "pg_catalog.pg_get_function_result(oid) AS funcresult, " + "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " + "pg_catalog.pg_get_function_result(oid) AS funcresult, " "array_to_string(protrftypes, ' ') AS protrftypes, " "proiswindow, provolatile, proisstrict, prosecdef, " "proleakproof, proconfig, procost, prorows, " @@ -11283,9 +11283,9 @@ dumpFunc(Archive *fout, FuncInfo *finfo) */ appendPQExpBuffer(query, "SELECT proretset, prosrc, probin, " - "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " - "pg_catalog.pg_get_function_result(oid) AS funcresult, " + "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " + "pg_catalog.pg_get_function_result(oid) AS funcresult, " "array_to_string(protrftypes, ' ') AS protrftypes, " "proiswindow, provolatile, proisstrict, prosecdef, " "proleakproof, proconfig, procost, prorows, " @@ -11301,9 +11301,9 @@ dumpFunc(Archive *fout, FuncInfo *finfo) */ appendPQExpBuffer(query, "SELECT proretset, prosrc, probin, " - "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " - "pg_catalog.pg_get_function_result(oid) AS funcresult, " + "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " + "pg_catalog.pg_get_function_result(oid) AS funcresult, " "proiswindow, provolatile, proisstrict, prosecdef, " "proleakproof, proconfig, procost, prorows, " "(SELECT lanname FROM pg_catalog.pg_language WHERE oid = prolang) AS lanname " @@ -11319,9 +11319,9 @@ dumpFunc(Archive *fout, FuncInfo *finfo) */ appendPQExpBuffer(query, "SELECT proretset, prosrc, probin, " - "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " - "pg_catalog.pg_get_function_result(oid) AS funcresult, " + "pg_catalog.pg_get_function_arguments(oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(oid) AS funciargs, " + "pg_catalog.pg_get_function_result(oid) AS funcresult, " "proiswindow, provolatile, proisstrict, prosecdef, " "false AS proleakproof, " " proconfig, procost, prorows, " @@ -11433,7 +11433,7 @@ dumpFunc(Archive *fout, FuncInfo *finfo) * contains quote or backslash; else use regular quoting. */ if (dopt->disable_dollar_quoting || - (strchr(prosrc, '\'') == NULL && strchr(prosrc, '\\') == NULL)) + (strchr(prosrc, '\'') == NULL && strchr(prosrc, '\\') == NULL)) appendStringLiteralAH(asPart, prosrc, fout); else appendStringLiteralDQ(asPart, prosrc, NULL); @@ -11559,7 +11559,7 @@ dumpFunc(Archive *fout, FuncInfo *finfo) if (i != 0) appendPQExpBufferStr(q, ", "); appendPQExpBuffer(q, "FOR TYPE %s", - getFormattedTypeName(fout, typeids[i], zeroAsNone)); + getFormattedTypeName(fout, typeids[i], zeroAsNone)); } } @@ -11766,7 +11766,7 @@ dumpCast(Archive *fout, CastInfo *cast) * it). */ appendPQExpBuffer(defqry, "WITH FUNCTION %s.%s", - fmtId(funcInfo->dobj.namespace->dobj.name), fsig); + fmtId(funcInfo->dobj.namespace->dobj.name), fsig); free(fsig); } else @@ -11876,7 +11876,7 @@ dumpTransform(Archive *fout, TransformInfo *transform) * pg_catalog schema (format_function_signature won't qualify it). */ appendPQExpBuffer(defqry, "FROM SQL WITH FUNCTION %s.%s", - fmtId(fromsqlFuncInfo->dobj.namespace->dobj.name), fsig); + fmtId(fromsqlFuncInfo->dobj.namespace->dobj.name), fsig); free(fsig); } else @@ -11897,7 +11897,7 @@ dumpTransform(Archive *fout, TransformInfo *transform) * pg_catalog schema (format_function_signature won't qualify it). */ appendPQExpBuffer(defqry, "TO SQL WITH FUNCTION %s.%s", - fmtId(tosqlFuncInfo->dobj.namespace->dobj.name), fsig); + fmtId(tosqlFuncInfo->dobj.namespace->dobj.name), fsig); free(fsig); } else @@ -12412,8 +12412,8 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "nspname AS opcfamilynsp, " "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcmethod) AS amname " "FROM pg_catalog.pg_opclass c " - "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = opcfamily " - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " + "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = opcfamily " + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " "WHERE c.oid = '%u'::pg_catalog.oid", opcinfo->dobj.catId.oid); } @@ -12424,7 +12424,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "opcdefault, NULL AS opcfamily, " "NULL AS opcfamilyname, " "NULL AS opcfamilynsp, " - "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcamid) AS amname " + "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opcamid) AS amname " "FROM pg_catalog.pg_opclass " "WHERE oid = '%u'::pg_catalog.oid", opcinfo->dobj.catId.oid); @@ -12509,11 +12509,11 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "amopopr::pg_catalog.regoperator, " "opfname AS sortfamily, " "nspname AS sortfamilynsp " - "FROM pg_catalog.pg_amop ao JOIN pg_catalog.pg_depend ON " + "FROM pg_catalog.pg_amop ao JOIN pg_catalog.pg_depend ON " "(classid = 'pg_catalog.pg_amop'::pg_catalog.regclass AND objid = ao.oid) " - "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = amopsortfamily " - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " - "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " + "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = amopsortfamily " + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " + "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " "AND amopfamily = '%s'::pg_catalog.oid " "ORDER BY amopstrategy", @@ -12527,9 +12527,9 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "NULL AS sortfamily, " "NULL AS sortfamilynsp " "FROM pg_catalog.pg_amop ao, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " + "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " "AND objid = ao.oid " "ORDER BY amopstrategy", opcinfo->dobj.catId.oid); @@ -12541,9 +12541,9 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "NULL AS sortfamily, " "NULL AS sortfamilynsp " "FROM pg_catalog.pg_amop ao, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " + "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " "AND objid = ao.oid " "ORDER BY amopstrategy", opcinfo->dobj.catId.oid); @@ -12624,10 +12624,10 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) "amproc::pg_catalog.regprocedure, " "amproclefttype::pg_catalog.regtype, " "amprocrighttype::pg_catalog.regtype " - "FROM pg_catalog.pg_amproc ap, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " + "FROM pg_catalog.pg_amproc ap, pg_catalog.pg_depend " + "WHERE refclassid = 'pg_catalog.pg_opclass'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amproc'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amproc'::pg_catalog.regclass " "AND objid = ap.oid " "ORDER BY amprocnum", opcinfo->dobj.catId.oid); @@ -12790,11 +12790,11 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) "amopopr::pg_catalog.regoperator, " "opfname AS sortfamily, " "nspname AS sortfamilynsp " - "FROM pg_catalog.pg_amop ao JOIN pg_catalog.pg_depend ON " + "FROM pg_catalog.pg_amop ao JOIN pg_catalog.pg_depend ON " "(classid = 'pg_catalog.pg_amop'::pg_catalog.regclass AND objid = ao.oid) " - "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = amopsortfamily " - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " - "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " + "LEFT JOIN pg_catalog.pg_opfamily f ON f.oid = amopsortfamily " + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = opfnamespace " + "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " "AND amopfamily = '%u'::pg_catalog.oid " "ORDER BY amopstrategy", @@ -12808,9 +12808,9 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) "NULL AS sortfamily, " "NULL AS sortfamilynsp " "FROM pg_catalog.pg_amop ao, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " + "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " "AND objid = ao.oid " "ORDER BY amopstrategy", opfinfo->dobj.catId.oid); @@ -12822,9 +12822,9 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) "NULL AS sortfamily, " "NULL AS sortfamilynsp " "FROM pg_catalog.pg_amop ao, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " + "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amop'::pg_catalog.regclass " "AND objid = ao.oid " "ORDER BY amopstrategy", opfinfo->dobj.catId.oid); @@ -12839,9 +12839,9 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) "amproclefttype::pg_catalog.regtype, " "amprocrighttype::pg_catalog.regtype " "FROM pg_catalog.pg_amproc ap, pg_catalog.pg_depend " - "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " + "WHERE refclassid = 'pg_catalog.pg_opfamily'::pg_catalog.regclass " "AND refobjid = '%u'::pg_catalog.oid " - "AND classid = 'pg_catalog.pg_amproc'::pg_catalog.regclass " + "AND classid = 'pg_catalog.pg_amproc'::pg_catalog.regclass " "AND objid = ap.oid " "ORDER BY amprocnum", opfinfo->dobj.catId.oid); @@ -12852,7 +12852,7 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) resetPQExpBuffer(query); appendPQExpBuffer(query, "SELECT " - "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opfmethod) AS amname " + "(SELECT amname FROM pg_catalog.pg_am WHERE oid = opfmethod) AS amname " "FROM pg_catalog.pg_opfamily " "WHERE oid = '%u'::pg_catalog.oid", opfinfo->dobj.catId.oid); @@ -13180,8 +13180,8 @@ dumpConversion(Archive *fout, ConvInfo *convinfo) /* Get conversion-specific details */ appendPQExpBuffer(query, "SELECT " - "pg_catalog.pg_encoding_to_char(conforencoding) AS conforencoding, " - "pg_catalog.pg_encoding_to_char(contoencoding) AS contoencoding, " + "pg_catalog.pg_encoding_to_char(conforencoding) AS conforencoding, " + "pg_catalog.pg_encoding_to_char(contoencoding) AS contoencoding, " "conproc, condefault " "FROM pg_catalog.pg_conversion c " "WHERE c.oid = '%u'::pg_catalog.oid", @@ -13363,18 +13363,18 @@ dumpAgg(Archive *fout, AggInfo *agginfo) { appendPQExpBuffer(query, "SELECT aggtransfn, " "aggfinalfn, aggtranstype::pg_catalog.regtype, " - "aggcombinefn, aggserialfn, aggdeserialfn, aggmtransfn, " - "aggminvtransfn, aggmfinalfn, aggmtranstype::pg_catalog.regtype, " + "aggcombinefn, aggserialfn, aggdeserialfn, aggmtransfn, " + "aggminvtransfn, aggmfinalfn, aggmtranstype::pg_catalog.regtype, " "aggfinalextra, aggmfinalextra, " "aggsortop::pg_catalog.regoperator, " "(aggkind = 'h') AS hypothetical, " "aggtransspace, agginitval, " "aggmtransspace, aggminitval, " "true AS convertok, " - "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs, " + "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs, " "p.proparallel " - "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " + "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " "WHERE a.aggfnoid = p.oid " "AND p.oid = '%u'::pg_catalog.oid", agginfo->aggfn.dobj.catId.oid); @@ -13384,7 +13384,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo) appendPQExpBuffer(query, "SELECT aggtransfn, " "aggfinalfn, aggtranstype::pg_catalog.regtype, " "'-' AS aggcombinefn, '-' AS aggserialfn, " - "'-' AS aggdeserialfn, aggmtransfn, aggminvtransfn, " + "'-' AS aggdeserialfn, aggmtransfn, aggminvtransfn, " "aggmfinalfn, aggmtranstype::pg_catalog.regtype, " "aggfinalextra, aggmfinalextra, " "aggsortop::pg_catalog.regoperator, " @@ -13392,9 +13392,9 @@ dumpAgg(Archive *fout, AggInfo *agginfo) "aggtransspace, agginitval, " "aggmtransspace, aggminitval, " "true AS convertok, " - "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs " - "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " + "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs " + "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " "WHERE a.aggfnoid = p.oid " "AND p.oid = '%u'::pg_catalog.oid", agginfo->aggfn.dobj.catId.oid); @@ -13413,9 +13413,9 @@ dumpAgg(Archive *fout, AggInfo *agginfo) "0 AS aggtransspace, agginitval, " "0 AS aggmtransspace, NULL AS aggminitval, " "true AS convertok, " - "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " - "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs " - "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " + "pg_catalog.pg_get_function_arguments(p.oid) AS funcargs, " + "pg_catalog.pg_get_function_identity_arguments(p.oid) AS funciargs " + "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " "WHERE a.aggfnoid = p.oid " "AND p.oid = '%u'::pg_catalog.oid", agginfo->aggfn.dobj.catId.oid); @@ -13434,7 +13434,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo) "0 AS aggtransspace, agginitval, " "0 AS aggmtransspace, NULL AS aggminitval, " "true AS convertok " - "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " + "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " "WHERE a.aggfnoid = p.oid " "AND p.oid = '%u'::pg_catalog.oid", agginfo->aggfn.dobj.catId.oid); @@ -13452,7 +13452,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo) "0 AS aggtransspace, agginitval, " "0 AS aggmtransspace, NULL AS aggminitval, " "true AS convertok " - "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " + "FROM pg_catalog.pg_aggregate a, pg_catalog.pg_proc p " "WHERE a.aggfnoid = p.oid " "AND p.oid = '%u'::pg_catalog.oid", agginfo->aggfn.dobj.catId.oid); @@ -13657,7 +13657,7 @@ dumpAgg(Archive *fout, AggInfo *agginfo) dumpSecLabel(fout, labelq->data, agginfo->aggfn.dobj.namespace->dobj.name, agginfo->aggfn.rolname, - agginfo->aggfn.dobj.catId, 0, agginfo->aggfn.dobj.dumpId); + agginfo->aggfn.dobj.catId, 0, agginfo->aggfn.dobj.dumpId); /* * Since there is no GRANT ON AGGREGATE syntax, we have to make the ACL @@ -14381,7 +14381,7 @@ dumpDefaultACL(Archive *fout, DefaultACLInfo *daclinfo) default: /* shouldn't get here */ exit_horribly(NULL, - "unrecognized object type in default privileges: %d\n", + "unrecognized object type in default privileges: %d\n", (int) daclinfo->defaclobjtype); type = ""; /* keep compiler quiet */ } @@ -14405,7 +14405,7 @@ dumpDefaultACL(Archive *fout, DefaultACLInfo *daclinfo) if (daclinfo->dobj.dump & DUMP_COMPONENT_ACL) ArchiveEntry(fout, daclinfo->dobj.catId, daclinfo->dobj.dumpId, tag->data, - daclinfo->dobj.namespace ? daclinfo->dobj.namespace->dobj.name : NULL, + daclinfo->dobj.namespace ? daclinfo->dobj.namespace->dobj.name : NULL, NULL, daclinfo->defaclrole, false, "DEFAULT ACL", SECTION_POST_DATA, @@ -14848,7 +14848,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo) PQExpBuffer initracl_subquery = createPQExpBuffer(); buildACLQueries(acl_subquery, racl_subquery, initacl_subquery, - initracl_subquery, "at.attacl", "c.relowner", "'c'", + initracl_subquery, "at.attacl", "c.relowner", "'c'", dopt->binary_upgrade); appendPQExpBuffer(query, @@ -14858,10 +14858,10 @@ dumpTable(Archive *fout, TableInfo *tbinfo) "%s AS initattacl, " "%s AS initrattacl " "FROM pg_catalog.pg_attribute at " - "JOIN pg_catalog.pg_class c ON (at.attrelid = c.oid) " + "JOIN pg_catalog.pg_class c ON (at.attrelid = c.oid) " "LEFT JOIN pg_catalog.pg_init_privs pip ON " "(at.attrelid = pip.objoid " - "AND pip.classoid = 'pg_catalog.pg_class'::pg_catalog.regclass " + "AND pip.classoid = 'pg_catalog.pg_class'::pg_catalog.regclass " "AND at.attnum = pip.objsubid) " "WHERE at.attrelid = '%u'::pg_catalog.oid AND " "NOT at.attisdropped " @@ -14892,7 +14892,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo) "SELECT attname, attacl, NULL as rattacl, " "NULL AS initattacl, NULL AS initrattacl " "FROM pg_catalog.pg_attribute " - "WHERE attrelid = '%u'::pg_catalog.oid AND NOT attisdropped " + "WHERE attrelid = '%u'::pg_catalog.oid AND NOT attisdropped " "AND attacl IS NOT NULL " "ORDER BY attnum", tbinfo->dobj.catId.oid); @@ -14945,7 +14945,7 @@ createViewAsClause(Archive *fout, TableInfo *tbinfo) /* Fetch the view definition */ appendPQExpBuffer(query, - "SELECT pg_catalog.pg_get_viewdef('%u'::pg_catalog.oid) AS viewdef", + "SELECT pg_catalog.pg_get_viewdef('%u'::pg_catalog.oid) AS viewdef", tbinfo->dobj.catId.oid); res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK); @@ -15116,9 +15116,9 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(query, "SELECT fs.srvname, " "pg_catalog.array_to_string(ARRAY(" - "SELECT pg_catalog.quote_ident(option_name) || " - "' ' || pg_catalog.quote_literal(option_value) " - "FROM pg_catalog.pg_options_to_table(ftoptions) " + "SELECT pg_catalog.quote_ident(option_name) || " + "' ' || pg_catalog.quote_literal(option_value) " + "FROM pg_catalog.pg_options_to_table(ftoptions) " "ORDER BY option_name" "), E',\n ') AS ftoptions " "FROM pg_catalog.pg_foreign_table ft " @@ -15198,7 +15198,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(q, " PARTITION OF "); if (parentRel->dobj.namespace != tbinfo->dobj.namespace) appendPQExpBuffer(q, "%s.", - fmtId(parentRel->dobj.namespace->dobj.name)); + fmtId(parentRel->dobj.namespace->dobj.name)); appendPQExpBufferStr(q, fmtId(parentRel->dobj.name)); } @@ -15220,7 +15220,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) * Default value --- suppress if to be printed separately. */ bool has_default = (tbinfo->attrdefs[j] != NULL && - !tbinfo->attrdefs[j]->separate); + !tbinfo->attrdefs[j]->separate); /* * Not Null constraint --- suppress if inherited, except @@ -15287,7 +15287,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) { /* always schema-qualify, don't try to be smart */ appendPQExpBuffer(q, " COLLATE %s.", - fmtId(coll->dobj.namespace->dobj.name)); + fmtId(coll->dobj.namespace->dobj.name)); appendPQExpBufferStr(q, fmtId(coll->dobj.name)); } } @@ -15355,7 +15355,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) appendPQExpBufferStr(q, ", "); if (parentRel->dobj.namespace != tbinfo->dobj.namespace) appendPQExpBuffer(q, "%s.", - fmtId(parentRel->dobj.namespace->dobj.name)); + fmtId(parentRel->dobj.namespace->dobj.name)); appendPQExpBufferStr(q, fmtId(parentRel->dobj.name)); } appendPQExpBufferChar(q, ')'); @@ -15499,7 +15499,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) /* Schema-qualify the parent table, if necessary */ if (parentRel->dobj.namespace != tbinfo->dobj.namespace) appendPQExpBuffer(parentname, "%s.", - fmtId(parentRel->dobj.namespace->dobj.name)); + fmtId(parentRel->dobj.namespace->dobj.name)); appendPQExpBuffer(parentname, "%s", fmtId(parentRel->dobj.name)); @@ -15507,7 +15507,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) /* In the partitioning case, we alter the parent */ if (tbinfo->ispartition) appendPQExpBuffer(q, - "ALTER TABLE ONLY %s ATTACH PARTITION ", + "ALTER TABLE ONLY %s ATTACH PARTITION ", parentname->data); else appendPQExpBuffer(q, "ALTER TABLE ONLY %s INHERIT ", @@ -15546,7 +15546,7 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) /* We preserve the toast oids, so we can use it during restore */ appendPQExpBufferStr(q, "\n-- For binary upgrade, set toast's relfrozenxid and relminmxid\n"); appendPQExpBuffer(q, "UPDATE pg_catalog.pg_class\n" - "SET relfrozenxid = '%u', relminmxid = '%u'\n" + "SET relfrozenxid = '%u', relminmxid = '%u'\n" "WHERE oid = '%u';\n", tbinfo->toast_frozenxid, tbinfo->toast_minmxid, tbinfo->toast_oid); @@ -15716,9 +15716,9 @@ dumpTableSchema(Archive *fout, TableInfo *tbinfo) ArchiveEntry(fout, tbinfo->dobj.catId, tbinfo->dobj.dumpId, tbinfo->dobj.name, tbinfo->dobj.namespace->dobj.name, - (tbinfo->relkind == RELKIND_VIEW) ? NULL : tbinfo->reltablespace, + (tbinfo->relkind == RELKIND_VIEW) ? NULL : tbinfo->reltablespace, tbinfo->rolname, - (strcmp(reltypename, "TABLE") == 0) ? tbinfo->hasoids : false, + (strcmp(reltypename, "TABLE") == 0) ? tbinfo->hasoids : false, reltypename, tbinfo->postponed_def ? SECTION_POST_DATA : SECTION_PRE_DATA, @@ -16043,7 +16043,7 @@ dumpConstraint(Archive *fout, ConstraintInfo *coninfo) else { appendPQExpBuffer(q, "%s (", - coninfo->contype == 'p' ? "PRIMARY KEY" : "UNIQUE"); + coninfo->contype == 'p' ? "PRIMARY KEY" : "UNIQUE"); for (k = 0; k < indxinfo->indnkeys; k++) { int indkey = (int) indxinfo->indkeys[k]; @@ -16263,7 +16263,7 @@ dumpTableConstraintComment(Archive *fout, ConstraintInfo *coninfo) tbinfo->dobj.namespace->dobj.name, tbinfo->rolname, coninfo->dobj.catId, 0, - coninfo->separate ? coninfo->dobj.dumpId : tbinfo->dobj.dumpId); + coninfo->separate ? coninfo->dobj.dumpId : tbinfo->dobj.dumpId); destroyPQExpBuffer(labelq); } @@ -16354,7 +16354,7 @@ dumpSequence(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(query, "SELECT 'bigint'::name AS sequence_type, " - "0 AS start_value, increment_by, max_value, min_value, " + "0 AS start_value, increment_by, max_value, min_value, " "cache_value, is_cycled FROM %s", fmtId(tbinfo->dobj.name)); } @@ -16443,7 +16443,7 @@ dumpSequence(Archive *fout, TableInfo *tbinfo) fmtId(owning_tab->dobj.name)); appendPQExpBuffer(query, "ALTER COLUMN %s ADD GENERATED ", - fmtId(owning_tab->attnames[tbinfo->owning_col - 1])); + fmtId(owning_tab->attnames[tbinfo->owning_col - 1])); if (owning_tab->attidentity[tbinfo->owning_col - 1] == ATTRIBUTE_IDENTITY_ALWAYS) appendPQExpBuffer(query, "ALWAYS"); else if (owning_tab->attidentity[tbinfo->owning_col - 1] == ATTRIBUTE_IDENTITY_BY_DEFAULT) @@ -16532,7 +16532,7 @@ dumpSequence(Archive *fout, TableInfo *tbinfo) appendPQExpBuffer(query, " OWNED BY %s", fmtId(owning_tab->dobj.name)); appendPQExpBuffer(query, ".%s;\n", - fmtId(owning_tab->attnames[tbinfo->owning_col - 1])); + fmtId(owning_tab->attnames[tbinfo->owning_col - 1])); if (tbinfo->dobj.dump & DUMP_COMPONENT_DEFINITION) ArchiveEntry(fout, nilCatalogId, createDumpId(), @@ -16975,7 +16975,7 @@ dumpRule(Archive *fout, RuleInfo *rinfo) { /* In the rule case, just print pg_get_ruledef's result verbatim */ appendPQExpBuffer(query, - "SELECT pg_catalog.pg_get_ruledef('%u'::pg_catalog.oid)", + "SELECT pg_catalog.pg_get_ruledef('%u'::pg_catalog.oid)", rinfo->dobj.catId.oid); res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK); @@ -17233,7 +17233,7 @@ processExtensionTables(Archive *fout, ExtensionInfo extinfo[], int nconditionitems; if (parsePGArray(extconfig, &extconfigarray, &nconfigitems) && - parsePGArray(extcondition, &extconditionarray, &nconditionitems) && + parsePGArray(extcondition, &extconditionarray, &nconditionitems) && nconfigitems == nconditionitems) { int j; @@ -17275,7 +17275,7 @@ processExtensionTables(Archive *fout, ExtensionInfo extinfo[], /* check schema excluded by an exclusion switch */ if (simple_oid_list_member(&schema_exclude_oids, - configtbl->dobj.namespace->dobj.catId.oid)) + configtbl->dobj.namespace->dobj.catId.oid)) dumpobj = false; if (dumpobj) @@ -17687,7 +17687,7 @@ findDumpableDependencies(ArchiveHandle *AH, DumpableObject *dobj, { *allocDeps *= 2; *dependencies = (DumpId *) pg_realloc(*dependencies, - *allocDeps * sizeof(DumpId)); + *allocDeps * sizeof(DumpId)); } (*dependencies)[*nDeps] = depid; (*nDeps)++; diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 2a08abfba51..b14bb8e963f 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -53,7 +53,7 @@ static void buildShSecLabels(PGconn *conn, const char *catalog_name, uint32 objectId, PQExpBuffer buffer, const char *target, const char *objname); static PGconn *connectDatabase(const char *dbname, const char *connstr, const char *pghost, const char *pgport, - const char *pguser, trivalue prompt_password, bool fail_on_error); + const char *pguser, trivalue prompt_password, bool fail_on_error); static char *constructConnStr(const char **keywords, const char **values); static PGresult *executeQuery(PGconn *conn, const char *query); static void executeCommand(PGconn *conn, const char *query); @@ -712,7 +712,7 @@ dumpRoles(PGconn *conn) "rolcreaterole, rolcreatedb, " "rolcanlogin, rolconnlimit, rolpassword, " "rolvaliduntil, rolreplication, rolbypassrls, " - "pg_catalog.shobj_description(oid, '%s') as rolcomment, " + "pg_catalog.shobj_description(oid, '%s') as rolcomment, " "rolname = current_user AS is_current_user " "FROM %s " "WHERE rolname !~ '^pg_' " @@ -723,7 +723,7 @@ dumpRoles(PGconn *conn) "rolcreaterole, rolcreatedb, " "rolcanlogin, rolconnlimit, rolpassword, " "rolvaliduntil, rolreplication, rolbypassrls, " - "pg_catalog.shobj_description(oid, '%s') as rolcomment, " + "pg_catalog.shobj_description(oid, '%s') as rolcomment, " "rolname = current_user AS is_current_user " "FROM %s " "ORDER BY 2", role_catalog, role_catalog); @@ -734,7 +734,7 @@ dumpRoles(PGconn *conn) "rolcanlogin, rolconnlimit, rolpassword, " "rolvaliduntil, rolreplication, " "false as rolbypassrls, " - "pg_catalog.shobj_description(oid, '%s') as rolcomment, " + "pg_catalog.shobj_description(oid, '%s') as rolcomment, " "rolname = current_user AS is_current_user " "FROM %s " "ORDER BY 2", role_catalog, role_catalog); @@ -745,7 +745,7 @@ dumpRoles(PGconn *conn) "rolcanlogin, rolconnlimit, rolpassword, " "rolvaliduntil, false as rolreplication, " "false as rolbypassrls, " - "pg_catalog.shobj_description(oid, '%s') as rolcomment, " + "pg_catalog.shobj_description(oid, '%s') as rolcomment, " "rolname = current_user AS is_current_user " "FROM %s " "ORDER BY 2", role_catalog, role_catalog); @@ -956,8 +956,8 @@ dumpRoleMembership(PGconn *conn) "LEFT JOIN %s ur on ur.oid = a.roleid " "LEFT JOIN %s um on um.oid = a.member " "LEFT JOIN %s ug on ug.oid = a.grantor " - "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')" - "ORDER BY 1,2,3", role_catalog, role_catalog, role_catalog); + "WHERE NOT (ur.rolname ~ '^pg_' AND um.rolname ~ '^pg_')" + "ORDER BY 1,2,3", role_catalog, role_catalog, role_catalog); res = executeQuery(conn, buf->data); if (PQntuples(res) > 0) @@ -1122,7 +1122,7 @@ dumpTablespaces(PGconn *conn) */ if (server_version >= 90600) res = executeQuery(conn, "SELECT oid, spcname, " - "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " + "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "pg_catalog.pg_tablespace_location(oid), " "(SELECT pg_catalog.array_agg(acl) FROM (SELECT pg_catalog.unnest(coalesce(spcacl,pg_catalog.acldefault('t',spcowner))) AS acl " "EXCEPT SELECT pg_catalog.unnest(pg_catalog.acldefault('t',spcowner))) as foo)" @@ -1131,40 +1131,40 @@ dumpTablespaces(PGconn *conn) "EXCEPT SELECT pg_catalog.unnest(coalesce(spcacl,pg_catalog.acldefault('t',spcowner)))) as foo)" "AS rspcacl," "array_to_string(spcoptions, ', ')," - "pg_catalog.shobj_description(oid, 'pg_tablespace') " + "pg_catalog.shobj_description(oid, 'pg_tablespace') " "FROM pg_catalog.pg_tablespace " "WHERE spcname !~ '^pg_' " "ORDER BY 1"); else if (server_version >= 90200) res = executeQuery(conn, "SELECT oid, spcname, " - "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " + "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "pg_catalog.pg_tablespace_location(oid), " "spcacl, '' as rspcacl, " "array_to_string(spcoptions, ', ')," - "pg_catalog.shobj_description(oid, 'pg_tablespace') " + "pg_catalog.shobj_description(oid, 'pg_tablespace') " "FROM pg_catalog.pg_tablespace " "WHERE spcname !~ '^pg_' " "ORDER BY 1"); else if (server_version >= 90000) res = executeQuery(conn, "SELECT oid, spcname, " - "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " + "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "spclocation, spcacl, '' as rspcacl, " "array_to_string(spcoptions, ', ')," - "pg_catalog.shobj_description(oid, 'pg_tablespace') " + "pg_catalog.shobj_description(oid, 'pg_tablespace') " "FROM pg_catalog.pg_tablespace " "WHERE spcname !~ '^pg_' " "ORDER BY 1"); else if (server_version >= 80200) res = executeQuery(conn, "SELECT oid, spcname, " - "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " + "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "spclocation, spcacl, '' as rspcacl, null, " - "pg_catalog.shobj_description(oid, 'pg_tablespace') " + "pg_catalog.shobj_description(oid, 'pg_tablespace') " "FROM pg_catalog.pg_tablespace " "WHERE spcname !~ '^pg_' " "ORDER BY 1"); else res = executeQuery(conn, "SELECT oid, spcname, " - "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " + "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "spclocation, spcacl, '' as rspcacl, " "null, null " "FROM pg_catalog.pg_tablespace " @@ -1364,8 +1364,8 @@ dumpCreateDB(PGconn *conn) "AS rdatacl, " "datconnlimit, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " - "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " - "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); + "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " + "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); else if (server_version >= 90300) printfPQExpBuffer(buf, "SELECT datname, " @@ -1375,19 +1375,19 @@ dumpCreateDB(PGconn *conn) "datistemplate, datacl, '' as rdatacl, " "datconnlimit, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " - "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " - "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); + "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " + "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); else if (server_version >= 80400) printfPQExpBuffer(buf, "SELECT datname, " "coalesce(rolname, (select rolname from %s where oid=(select datdba from pg_database where datname='template0'))), " "pg_encoding_to_char(d.encoding), " - "datcollate, datctype, datfrozenxid, 0 AS datminmxid, " + "datcollate, datctype, datfrozenxid, 0 AS datminmxid, " "datistemplate, datacl, '' as rdatacl, " "datconnlimit, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " - "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " - "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); + "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " + "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); else if (server_version >= 80100) printfPQExpBuffer(buf, "SELECT datname, " @@ -1397,8 +1397,8 @@ dumpCreateDB(PGconn *conn) "datistemplate, datacl, '' as rdatacl, " "datconnlimit, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " - "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " - "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); + "FROM pg_database d LEFT JOIN %s u ON (datdba = u.oid) " + "WHERE datallowconn ORDER BY 1", role_catalog, role_catalog); else printfPQExpBuffer(buf, "SELECT datname, " @@ -1408,7 +1408,7 @@ dumpCreateDB(PGconn *conn) "datistemplate, datacl, '' as rdatacl, " "-1 as datconnlimit, " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " - "FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) " + "FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) " "WHERE datallowconn ORDER BY 1"); res = executeQuery(conn, buf->data); @@ -1609,7 +1609,7 @@ dumpUserConfig(PGconn *conn, const char *username) if (server_version >= 90000) printfPQExpBuffer(buf, "SELECT setconfig[%d] FROM pg_db_role_setting WHERE " "setdatabase = 0 AND setrole = " - "(SELECT oid FROM %s WHERE rolname = ", count, role_catalog); + "(SELECT oid FROM %s WHERE rolname = ", count, role_catalog); else if (server_version >= 80100) printfPQExpBuffer(buf, "SELECT rolconfig[%d] FROM %s WHERE rolname = ", count, role_catalog); else @@ -1650,7 +1650,7 @@ dumpDbRoleConfig(PGconn *conn) printfPQExpBuffer(buf, "SELECT rolname, datname, unnest(setconfig) " "FROM pg_db_role_setting, %s u, pg_database " - "WHERE setrole = u.oid AND setdatabase = pg_database.oid", role_catalog); + "WHERE setrole = u.oid AND setdatabase = pg_database.oid", role_catalog); res = executeQuery(conn, buf->data); if (PQntuples(res) > 0) diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 1e6835d5290..860a211a3cc 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -488,7 +488,7 @@ usage(const char *progname) printf(_(" --no-tablespaces do not restore tablespace assignments\n")); printf(_(" --section=SECTION restore named section (pre-data, data, or post-data)\n")); printf(_(" --strict-names require table and/or schema include patterns to\n" - " match at least one entity each\n")); + " match at least one entity each\n")); printf(_(" --use-set-session-authorization\n" " use SET SESSION AUTHORIZATION commands instead of\n" " ALTER OWNER commands to set ownership\n")); diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 27c5309f63d..d4dd1d49ca5 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -438,7 +438,7 @@ main(int argc, char *argv[]) if (ControlFile.state != DB_SHUTDOWNED && !force) { printf(_("The database server was not shut down cleanly.\n" - "Resetting the write-ahead log might cause data to be lost.\n" + "Resetting the write-ahead log might cause data to be lost.\n" "If you want to proceed anyway, use -f to force reset.\n")); exit(1); } @@ -564,7 +564,7 @@ ReadControlFile(void) close(fd); if (len >= sizeof(ControlFileData) && - ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION) + ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION) { /* Check the CRC. */ INIT_CRC32C(crc); diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c index e5b254069d4..dd6919025d9 100644 --- a/src/bin/pg_rewind/filemap.c +++ b/src/bin/pg_rewind/filemap.c @@ -604,7 +604,7 @@ isRelDataFile(const char *path) else { nmatch = sscanf(path, "pg_tblspc/%u/PG_%20s/%u/%u.%u", - &rnode.spcNode, buf, &rnode.dbNode, &rnode.relNode, + &rnode.spcNode, buf, &rnode.dbNode, &rnode.relNode, &segNo); if (nmatch == 4 || nmatch == 5) matched = true; diff --git a/src/bin/pg_rewind/parsexlog.c b/src/bin/pg_rewind/parsexlog.c index 1e3d329705b..1befdbdeea3 100644 --- a/src/bin/pg_rewind/parsexlog.c +++ b/src/bin/pg_rewind/parsexlog.c @@ -371,7 +371,7 @@ extractPageInfo(XLogReaderState *record) */ pg_fatal("WAL record modifies a relation, but record type is not recognized\n" "lsn: %X/%X, rmgr: %s, info: %02X\n", - (uint32) (record->ReadRecPtr >> 32), (uint32) (record->ReadRecPtr), + (uint32) (record->ReadRecPtr >> 32), (uint32) (record->ReadRecPtr), RmgrNames[rmid], info); } diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 5526ff96c73..6c75b56992a 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -589,7 +589,7 @@ createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, XLogRecPtr checkpo "BACKUP FROM: standby\n" "START TIME: %s\n", /* omit LABEL: line */ - (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename, + (uint32) (startpoint >> 32), (uint32) startpoint, xlogfilename, (uint32) (checkpointloc >> 32), (uint32) checkpointloc, strfbuf); if (len >= sizeof(buf)) diff --git a/src/bin/pg_test_timing/pg_test_timing.c b/src/bin/pg_test_timing/pg_test_timing.c index 4867681eb4b..2f1ab7cd608 100644 --- a/src/bin/pg_test_timing/pg_test_timing.c +++ b/src/bin/pg_test_timing/pg_test_timing.c @@ -99,7 +99,7 @@ handle_args(int argc, char *argv[]) else { fprintf(stderr, - _("%s: duration must be a positive integer (duration is \"%d\")\n"), + _("%s: duration must be a positive integer (duration is \"%d\")\n"), progname, test_duration); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index fbe46d8795f..120c9ae2652 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -209,18 +209,18 @@ output_completion_banner(char *analyze_script_file_name, else pg_log(PG_REPORT, "Optimizer statistics and free space information are not transferred\n" - "by pg_upgrade so, once you start the new server, consider running:\n" + "by pg_upgrade so, once you start the new server, consider running:\n" " %s\n\n", analyze_script_file_name); if (deletion_script_file_name) pg_log(PG_REPORT, - "Running this script will delete the old cluster's data files:\n" + "Running this script will delete the old cluster's data files:\n" " %s\n", deletion_script_file_name); else pg_log(PG_REPORT, - "Could not create a script to delete the old cluster's data files\n" + "Could not create a script to delete the old cluster's data files\n" "because user-defined tablespaces or the new cluster's data directory\n" "exist in the old cluster directory. The old cluster's contents must\n" "be deleted manually.\n"); @@ -739,7 +739,7 @@ check_proper_datallowconn(ClusterInfo *cluster) */ if (strcmp(datallowconn, "f") == 0) pg_fatal("All non-template0 databases must allow connections, " - "i.e. their pg_database.datallowconn must be true\n"); + "i.e. their pg_database.datallowconn must be true\n"); } } @@ -859,8 +859,8 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster) { pg_log(PG_REPORT, "fatal\n"); pg_fatal("Your installation contains \"contrib/isn\" functions which rely on the\n" - "bigint data type. Your old and new clusters pass bigint values\n" - "differently so this cluster cannot currently be upgraded. You can\n" + "bigint data type. Your old and new clusters pass bigint values\n" + "differently so this cluster cannot currently be upgraded. You can\n" "manually upgrade databases that use \"contrib/isn\" facilities and remove\n" "\"contrib/isn\" from the old cluster and restart the upgrade. A list of\n" "the problem functions is in the file:\n" @@ -919,16 +919,16 @@ check_for_reg_data_type_usage(ClusterInfo *cluster) "WHERE c.oid = a.attrelid AND " " NOT a.attisdropped AND " " a.atttypid IN ( " - " 'pg_catalog.regproc'::pg_catalog.regtype, " - " 'pg_catalog.regprocedure'::pg_catalog.regtype, " - " 'pg_catalog.regoper'::pg_catalog.regtype, " - " 'pg_catalog.regoperator'::pg_catalog.regtype, " + " 'pg_catalog.regproc'::pg_catalog.regtype, " + " 'pg_catalog.regprocedure'::pg_catalog.regtype, " + " 'pg_catalog.regoper'::pg_catalog.regtype, " + " 'pg_catalog.regoperator'::pg_catalog.regtype, " /* regclass.oid is preserved, so 'regclass' is OK */ /* regtype.oid is preserved, so 'regtype' is OK */ - " 'pg_catalog.regconfig'::pg_catalog.regtype, " - " 'pg_catalog.regdictionary'::pg_catalog.regtype) AND " + " 'pg_catalog.regconfig'::pg_catalog.regtype, " + " 'pg_catalog.regdictionary'::pg_catalog.regtype) AND " " c.relnamespace = n.oid AND " - " n.nspname NOT IN ('pg_catalog', 'information_schema')"); + " n.nspname NOT IN ('pg_catalog', 'information_schema')"); ntups = PQntuples(res); i_nspname = PQfnumber(res, "nspname"); @@ -963,8 +963,8 @@ check_for_reg_data_type_usage(ClusterInfo *cluster) { pg_log(PG_REPORT, "fatal\n"); pg_fatal("Your installation contains one of the reg* data types in user tables.\n" - "These data types reference system OIDs that are not preserved by\n" - "pg_upgrade, so this cluster cannot currently be upgraded. You can\n" + "These data types reference system OIDs that are not preserved by\n" + "pg_upgrade, so this cluster cannot currently be upgraded. You can\n" "remove the problem tables and restart the upgrade. A list of the problem\n" "columns is in the file:\n" " %s\n\n", output_path); @@ -1015,11 +1015,11 @@ check_for_jsonb_9_4_usage(ClusterInfo *cluster) " pg_catalog.pg_attribute a " "WHERE c.oid = a.attrelid AND " " NOT a.attisdropped AND " - " a.atttypid = 'pg_catalog.jsonb'::pg_catalog.regtype AND " + " a.atttypid = 'pg_catalog.jsonb'::pg_catalog.regtype AND " " c.relnamespace = n.oid AND " /* exclude possible orphaned temp tables */ " n.nspname !~ '^pg_temp_' AND " - " n.nspname NOT IN ('pg_catalog', 'information_schema')"); + " n.nspname NOT IN ('pg_catalog', 'information_schema')"); ntups = PQntuples(res); i_nspname = PQfnumber(res, "nspname"); diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c index 519256851c8..3abef16c815 100644 --- a/src/bin/pg_upgrade/controldata.c +++ b/src/bin/pg_upgrade/controldata.c @@ -551,7 +551,7 @@ check_control_data(ControlData *oldctrl, { if (oldctrl->align == 0 || oldctrl->align != newctrl->align) pg_fatal("old and new pg_controldata alignments are invalid or do not match\n" - "Likely one cluster is a 32-bit install, the other 64-bit\n"); + "Likely one cluster is a 32-bit install, the other 64-bit\n"); if (oldctrl->blocksz == 0 || oldctrl->blocksz != newctrl->blocksz) pg_fatal("old and new pg_controldata block sizes are invalid or do not match\n"); @@ -620,6 +620,6 @@ disable_old_cluster(void) pg_log(PG_REPORT, "\n" "If you want to start the old cluster, you will need to remove\n" "the \".old\" suffix from %s/global/pg_control.old.\n" - "Because \"link\" mode was used, the old cluster cannot be safely\n" - "started once the new cluster has been started.\n\n", old_cluster.pgdata); + "Because \"link\" mode was used, the old cluster cannot be safely\n" + "started once the new cluster has been started.\n\n", old_cluster.pgdata); } diff --git a/src/bin/pg_upgrade/dump.c b/src/bin/pg_upgrade/dump.c index 2e621b027c8..77c03ac05bc 100644 --- a/src/bin/pg_upgrade/dump.c +++ b/src/bin/pg_upgrade/dump.c @@ -61,9 +61,9 @@ generate_old_dump(void) snprintf(log_file_name, sizeof(log_file_name), DB_DUMP_LOG_FILE_MASK, old_db->db_oid); parallel_exec_prog(log_file_name, NULL, - "\"%s/pg_dump\" %s --schema-only --quote-all-identifiers " - "--binary-upgrade --format=custom %s --file=\"%s\" %s", - new_cluster.bindir, cluster_conn_opts(&old_cluster), + "\"%s/pg_dump\" %s --schema-only --quote-all-identifiers " + "--binary-upgrade --format=custom %s --file=\"%s\" %s", + new_cluster.bindir, cluster_conn_opts(&old_cluster), log_opts.verbose ? "--verbose" : "", sql_file_name, escaped_connstr.data); diff --git a/src/bin/pg_upgrade/function.c b/src/bin/pg_upgrade/function.c index 685d1de0b73..8383b75325b 100644 --- a/src/bin/pg_upgrade/function.c +++ b/src/bin/pg_upgrade/function.c @@ -95,7 +95,7 @@ get_loadable_libraries(void) "FROM pg_catalog.pg_proc p " " JOIN pg_catalog.pg_namespace n " " ON pronamespace = n.oid " - "WHERE proname = 'plpython_call_handler' AND " + "WHERE proname = 'plpython_call_handler' AND " "nspname = 'public' AND " "prolang = %u AND " "probin = '$libdir/plpython' AND " @@ -118,9 +118,9 @@ get_loadable_libraries(void) "pre-8.1 install of plpython, and must be removed for pg_upgrade\n" "to complete because it references a now-obsolete \"plpython\"\n" "shared object file. You can remove the \"public\" schema version\n" - "of this function by running the following command:\n" + "of this function by running the following command:\n" "\n" - " DROP FUNCTION public.plpython_call_handler()\n" + " DROP FUNCTION public.plpython_call_handler()\n" "\n" "in each affected database:\n" "\n"); diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c index ab6328eef52..6500302c3d4 100644 --- a/src/bin/pg_upgrade/info.c +++ b/src/bin/pg_upgrade/info.c @@ -269,7 +269,7 @@ report_unmatched_relation(const RelInfo *rel, const DbInfo *db, bool is_new_db) if (i >= db->rel_arr.nrels) snprintf(reldesc + strlen(reldesc), sizeof(reldesc) - strlen(reldesc), - _(" which is the TOAST table for OID %u"), rel->toastheap); + _(" which is the TOAST table for OID %u"), rel->toastheap); } if (is_new_db) 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) diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c index 2a9c397277c..ef9793f3bdb 100644 --- a/src/bin/pg_upgrade/pg_upgrade.c +++ b/src/bin/pg_upgrade/pg_upgrade.c @@ -328,7 +328,7 @@ create_new_objects(void) */ parallel_exec_prog(log_file_name, NULL, - "\"%s/pg_restore\" %s --exit-on-error --verbose --dbname %s \"%s\"", + "\"%s/pg_restore\" %s --exit-on-error --verbose --dbname %s \"%s\"", new_cluster.bindir, cluster_conn_opts(&new_cluster), escaped_connstr.data, @@ -561,7 +561,7 @@ set_frozenxids(bool minmxid_only) */ if (strcmp(datallowconn, "f") == 0) PQclear(executeQueryOrDie(conn_template1, - "ALTER DATABASE %s ALLOW_CONNECTIONS = true", + "ALTER DATABASE %s ALLOW_CONNECTIONS = true", quote_identifier(datname))); conn = connectToServer(&new_cluster, datname); @@ -593,7 +593,7 @@ set_frozenxids(bool minmxid_only) /* Reset datallowconn flag */ if (strcmp(datallowconn, "f") == 0) PQclear(executeQueryOrDie(conn_template1, - "ALTER DATABASE %s ALLOW_CONNECTIONS = false", + "ALTER DATABASE %s ALLOW_CONNECTIONS = false", quote_identifier(datname))); } diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index c0beb5f4cb9..13f7ebfe5a2 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -397,9 +397,9 @@ void get_sock_dir(ClusterInfo *cluster, bool live_check); /* relfilenode.c */ void transfer_all_new_tablespaces(DbInfoArr *old_db_arr, - DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata); + DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata); void transfer_all_new_dbs(DbInfoArr *old_db_arr, - DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata, + DbInfoArr *new_db_arr, char *old_pgdata, char *new_pgdata, char *old_tablespace); /* tablespace.c */ diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c index 87a98983e22..23ba6a2e11b 100644 --- a/src/bin/pg_upgrade/server.c +++ b/src/bin/pg_upgrade/server.c @@ -231,13 +231,13 @@ start_postmaster(ClusterInfo *cluster, bool throw_error) * win on ext4. */ snprintf(cmd, sizeof(cmd), - "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start", - cluster->bindir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port, + "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start", + cluster->bindir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port, (cluster->controldata.cat_ver >= BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? " -b" : " -c autovacuum=off -c autovacuum_freeze_max_age=2000000000", (cluster == &new_cluster) ? - " -c synchronous_commit=off -c fsync=off -c full_page_writes=off" : "", + " -c synchronous_commit=off -c fsync=off -c full_page_writes=off" : "", cluster->pgopts ? cluster->pgopts : "", socket_string); /* diff --git a/src/bin/pg_upgrade/tablespace.c b/src/bin/pg_upgrade/tablespace.c index 4938bc2de26..31958d5c67f 100644 --- a/src/bin/pg_upgrade/tablespace.c +++ b/src/bin/pg_upgrade/tablespace.c @@ -24,7 +24,7 @@ init_tablespaces(void) set_tablespace_directory_suffix(&new_cluster); if (os_info.num_old_tablespaces > 0 && - strcmp(old_cluster.tablespace_suffix, new_cluster.tablespace_suffix) == 0) + strcmp(old_cluster.tablespace_suffix, new_cluster.tablespace_suffix) == 0) pg_fatal("Cannot upgrade to/from the same system catalog version when\n" "using tablespaces.\n"); } @@ -52,13 +52,13 @@ get_tablespace_paths(void) " spcname != 'pg_global'", /* 9.2 removed the spclocation column */ (GET_MAJOR_VERSION(old_cluster.major_version) <= 901) ? - "spclocation" : "pg_catalog.pg_tablespace_location(oid) AS spclocation"); + "spclocation" : "pg_catalog.pg_tablespace_location(oid) AS spclocation"); res = executeQueryOrDie(conn, "%s", query); if ((os_info.num_old_tablespaces = PQntuples(res)) != 0) os_info.old_tablespaces = (char **) pg_malloc( - os_info.num_old_tablespaces * sizeof(char *)); + os_info.num_old_tablespaces * sizeof(char *)); else os_info.old_tablespaces = NULL; @@ -69,7 +69,7 @@ get_tablespace_paths(void) struct stat statBuf; os_info.old_tablespaces[tblnum] = pg_strdup( - PQgetvalue(res, tblnum, i_spclocation)); + PQgetvalue(res, tblnum, i_spclocation)); /* * Check that the tablespace path exists and is a directory. @@ -88,8 +88,8 @@ get_tablespace_paths(void) os_info.old_tablespaces[tblnum]); else report_status(PG_FATAL, - "could not stat tablespace directory \"%s\": %s\n", - os_info.old_tablespaces[tblnum], strerror(errno)); + "could not stat tablespace directory \"%s\": %s\n", + os_info.old_tablespaces[tblnum], strerror(errno)); } if (!S_ISDIR(statBuf.st_mode)) report_status(PG_FATAL, diff --git a/src/bin/pg_upgrade/version.c b/src/bin/pg_upgrade/version.c index 3150a29a5b1..a9071a3448f 100644 --- a/src/bin/pg_upgrade/version.c +++ b/src/bin/pg_upgrade/version.c @@ -138,12 +138,12 @@ old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster) " pg_catalog.pg_attribute a " "WHERE c.oid = a.attrelid AND " " NOT a.attisdropped AND " - " a.atttypid = 'pg_catalog.line'::pg_catalog.regtype AND " + " a.atttypid = 'pg_catalog.line'::pg_catalog.regtype AND " " c.relnamespace = n.oid AND " /* exclude possible orphaned temp tables */ " n.nspname !~ '^pg_temp_' AND " " n.nspname !~ '^pg_toast_temp_' AND " - " n.nspname NOT IN ('pg_catalog', 'information_schema')"); + " n.nspname NOT IN ('pg_catalog', 'information_schema')"); ntups = PQntuples(res); i_nspname = PQfnumber(res, "nspname"); @@ -235,7 +235,7 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster) " pg_catalog.pg_attribute a " "WHERE c.oid = a.attrelid AND " " NOT a.attisdropped AND " - " a.atttypid = 'pg_catalog.unknown'::pg_catalog.regtype AND " + " a.atttypid = 'pg_catalog.unknown'::pg_catalog.regtype AND " " c.relkind IN (" CppAsString2(RELKIND_RELATION) ", " CppAsString2(RELKIND_COMPOSITE_TYPE) ", " @@ -244,7 +244,7 @@ old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster) /* exclude possible orphaned temp tables */ " n.nspname !~ '^pg_temp_' AND " " n.nspname !~ '^pg_toast_temp_' AND " - " n.nspname NOT IN ('pg_catalog', 'information_schema')"); + " n.nspname NOT IN ('pg_catalog', 'information_schema')"); ntups = PQntuples(res); i_nspname = PQfnumber(res, "nspname"); @@ -393,7 +393,7 @@ old_9_6_invalidate_hash_indexes(ClusterInfo *cluster, bool check_mode) "reindexed with the REINDEX command. The file:\n" " %s\n" "when executed by psql by the database superuser will recreate all invalid\n" - "indexes; until then, none of these indexes will be used.\n\n", + "indexes; until then, none of these indexes will be used.\n\n", output_path); } else diff --git a/src/bin/pg_waldump/compat.c b/src/bin/pg_waldump/compat.c index a5d2f69c544..19a3a9d0c59 100644 --- a/src/bin/pg_waldump/compat.c +++ b/src/bin/pg_waldump/compat.c @@ -30,7 +30,7 @@ timestamptz_to_time_t(TimestampTz t) pg_time_t result; result = (pg_time_t) (t / USECS_PER_SEC + - ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY)); + ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY)); return result; } diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c index f024a17f29a..81ec3e32fdb 100644 --- a/src/bin/pg_waldump/pg_waldump.c +++ b/src/bin/pg_waldump/pg_waldump.c @@ -715,11 +715,11 @@ usage(void) " use --rmgr=list to list valid resource manager names\n")); printf(_(" -s, --start=RECPTR start reading at WAL location RECPTR\n")); printf(_(" -t, --timeline=TLI timeline from which to read log records\n" - " (default: 1 or the value used in STARTSEG)\n")); + " (default: 1 or the value used in STARTSEG)\n")); printf(_(" -V, --version output version information, then exit\n")); printf(_(" -x, --xid=XID only show records with TransactionId XID\n")); printf(_(" -z, --stats[=record] show statistics instead of records\n" - " (optionally, show per-record statistics)\n")); + " (optionally, show per-record statistics)\n")); printf(_(" -?, --help show this help, then exit\n")); } @@ -948,7 +948,7 @@ main(int argc, char **argv) else if (!XLByteInSeg(private.startptr, segno)) { fprintf(stderr, - _("%s: start WAL location %X/%X is not inside file \"%s\"\n"), + _("%s: start WAL location %X/%X is not inside file \"%s\"\n"), progname, (uint32) (private.startptr >> 32), (uint32) private.startptr, @@ -992,7 +992,7 @@ main(int argc, char **argv) private.endptr != (segno + 1) * XLogSegSize) { fprintf(stderr, - _("%s: end WAL location %X/%X is not inside file \"%s\"\n"), + _("%s: end WAL location %X/%X is not inside file \"%s\"\n"), progname, (uint32) (private.endptr >> 32), (uint32) private.endptr, diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 3bd33f2d520..4d364a1db4c 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -476,17 +476,17 @@ usage(void) "\nInitialization options:\n" " -i, --initialize invokes initialization mode\n" " -F, --fillfactor=NUM set fill factor\n" - " -n, --no-vacuum do not run VACUUM after initialization\n" - " -q, --quiet quiet logging (one message each 5 seconds)\n" + " -n, --no-vacuum do not run VACUUM after initialization\n" + " -q, --quiet quiet logging (one message each 5 seconds)\n" " -s, --scale=NUM scaling factor\n" " --foreign-keys create foreign key constraints between tables\n" " --index-tablespace=TABLESPACE\n" - " create indexes in the specified tablespace\n" - " --tablespace=TABLESPACE create tables in the specified tablespace\n" + " create indexes in the specified tablespace\n" + " --tablespace=TABLESPACE create tables in the specified tablespace\n" " --unlogged-tables create tables as unlogged tables\n" "\nOptions to select what to run:\n" " -b, --builtin=NAME[@W] add builtin script NAME weighted at W (default: 1)\n" - " (use \"-b list\" to list available scripts)\n" + " (use \"-b list\" to list available scripts)\n" " -f, --file=FILENAME[@W] add script FILENAME weighted at W (default: 1)\n" " -N, --skip-some-updates skip updates of pgbench_tellers and pgbench_branches\n" " (same as \"-b simple-update\")\n" @@ -496,7 +496,7 @@ usage(void) " -c, --client=NUM number of concurrent database clients (default: 1)\n" " -C, --connect establish new connection for each transaction\n" " -D, --define=VARNAME=VALUE\n" - " define variable for use by custom script\n" + " define variable for use by custom script\n" " -j, --jobs=NUM number of threads (default: 1)\n" " -l, --log write transaction times to log file\n" " -L, --latency-limit=NUM count transactions lasting more than NUM ms as late\n" @@ -505,22 +505,22 @@ usage(void) " -n, --no-vacuum do not run VACUUM before tests\n" " -P, --progress=NUM show thread progress report every NUM seconds\n" " -r, --report-latencies report average latency per command\n" - " -R, --rate=NUM target rate in transactions per second\n" + " -R, --rate=NUM target rate in transactions per second\n" " -s, --scale=NUM report this scale factor in output\n" " -t, --transactions=NUM number of transactions each client runs (default: 10)\n" - " -T, --time=NUM duration of benchmark test in seconds\n" + " -T, --time=NUM duration of benchmark test in seconds\n" " -v, --vacuum-all vacuum all four standard tables before tests\n" " --aggregate-interval=NUM aggregate data over NUM seconds\n" " --log-prefix=PREFIX prefix for transaction time log file\n" " (default: \"pgbench_log\")\n" - " --progress-timestamp use Unix epoch timestamps for progress\n" + " --progress-timestamp use Unix epoch timestamps for progress\n" " --sampling-rate=NUM fraction of transactions to log (e.g., 0.01 for 1%%)\n" "\nCommon options:\n" " -d, --debug print debugging output\n" - " -h, --host=HOSTNAME database server host or socket directory\n" + " -h, --host=HOSTNAME database server host or socket directory\n" " -p, --port=PORT database server port number\n" " -U, --username=USERNAME connect as specified database user\n" - " -V, --version output version information, then exit\n" + " -V, --version output version information, then exit\n" " -?, --help show this help, then exit\n" "\n" "Report bugs to <[email protected]>.\n", @@ -1064,7 +1064,7 @@ lookupCreateVariable(CState *st, const char *context, char *name) /* Create variable at the end of the array */ if (st->variables) newvars = (Variable *) pg_realloc(st->variables, - (st->nvariables + 1) * sizeof(Variable)); + (st->nvariables + 1) * sizeof(Variable)); else newvars = (Variable *) pg_malloc(sizeof(Variable)); @@ -1615,20 +1615,20 @@ evalFunc(TState *thread, CState *st, } setIntValue(retval, - getGaussianRand(thread, imin, imax, param)); + getGaussianRand(thread, imin, imax, param)); } else /* exponential */ { if (param <= 0.0) { fprintf(stderr, - "exponential parameter must be greater than zero" + "exponential parameter must be greater than zero" " (got %f)\n", param); return false; } setIntValue(retval, - getExponentialRand(thread, imin, imax, param)); + getExponentialRand(thread, imin, imax, param)); } } @@ -1883,7 +1883,7 @@ sendCommand(CState *st, Command *command) continue; preparedStatementName(name, st->use_file, j); res = PQprepare(st->con, name, - commands[j]->argv[0], commands[j]->argc - 1, NULL); + commands[j]->argv[0], commands[j]->argc - 1, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) fprintf(stderr, "%s", PQerrorMessage(st->con)); PQclear(res); @@ -2703,7 +2703,7 @@ init(bool is_no_vacuum) { /* "filler" column defaults to NULL */ snprintf(sql, sizeof(sql), - "insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)", + "insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)", i + 1, i / ntellers + 1); executeStatement(con, sql); } @@ -3438,7 +3438,7 @@ parseScriptWeight(const char *option, char **script) if (wtmp > INT_MAX || wtmp < 0) { fprintf(stderr, - "weight specification out of range (0 .. %u): " INT64_FORMAT "\n", + "weight specification out of range (0 .. %u): " INT64_FORMAT "\n", INT_MAX, (int64) wtmp); exit(1); } @@ -3496,7 +3496,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time, time_include = INSTR_TIME_GET_DOUBLE(total_time); tps_include = total->cnt / time_include; tps_exclude = total->cnt / (time_include - - (INSTR_TIME_GET_DOUBLE(conn_total_time) / nclients)); + (INSTR_TIME_GET_DOUBLE(conn_total_time) / nclients)); /* Report test parameters. */ printf("transaction type: %s\n", @@ -3580,7 +3580,7 @@ printResults(TState *threads, StatsData *total, instr_time total_time, printf(" - number of transactions skipped: " INT64_FORMAT " (%.3f%%)\n", sql_script[i].stats.skipped, 100.0 * sql_script[i].stats.skipped / - (sql_script[i].stats.skipped + sql_script[i].stats.cnt)); + (sql_script[i].stats.skipped + sql_script[i].stats.cnt)); if (num_scripts > 1) printSimpleStats(" - latency", &sql_script[i].stats.latency); diff --git a/src/bin/pgevent/pgevent.c b/src/bin/pgevent/pgevent.c index 0b50a3cc6a8..807a2c93120 100644 --- a/src/bin/pgevent/pgevent.c +++ b/src/bin/pgevent/pgevent.c @@ -81,7 +81,7 @@ DllRegisterServer(void) * EventLog registry key. */ _snprintf(key_name, sizeof(key_name), - "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\%s", + "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\%s", event_source); if (RegCreateKey(HKEY_LOCAL_MACHINE, key_name, &key)) { @@ -134,7 +134,7 @@ DllUnregisterServer(void) */ _snprintf(key_name, sizeof(key_name), - "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\%s", + "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\%s", event_source); if (RegDeleteKey(HKEY_LOCAL_MACHINE, key_name)) { diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 7faf5bc582d..14c64208ca3 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -552,7 +552,7 @@ exec_command_cd(PsqlScanState scan_state, bool active_branch, const char *cmd) { psql_error("could not get home directory for user ID %ld: %s\n", (long) user_id, - errno ? strerror(errno) : _("user does not exist")); + errno ? strerror(errno) : _("user does not exist")); exit(EXIT_FAILURE); } dir = pw->pw_dir; @@ -804,7 +804,7 @@ exec_command_d(PsqlScanState scan_state, bool active_branch, const char *cmd) if (pattern) pattern2 = psql_scan_slash_option(scan_state, - OT_NORMAL, NULL, true); + OT_NORMAL, NULL, true); success = listDbRoleSettings(pattern, pattern2); } else @@ -3291,7 +3291,7 @@ printSSLInfo(void) protocol ? protocol : _("unknown"), cipher ? cipher : _("unknown"), bits ? bits : _("unknown"), - (compression && strcmp(compression, "off") != 0) ? _("on") : _("off")); + (compression && strcmp(compression, "off") != 0) ? _("on") : _("off")); } @@ -3481,7 +3481,7 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf, "/", (int) getpid()); #else snprintf(fnametmp, sizeof(fnametmp), "%s%spsql.edit.%d.sql", tmpdir, - "" /* trailing separator already present */ , (int) getpid()); + "" /* trailing separator already present */ , (int) getpid()); #endif fname = (const char *) fnametmp; @@ -4156,19 +4156,19 @@ printPsetInfo(const char *param, struct printQueryOpt *popt) else if (strcmp(param, "unicode_border_linestyle") == 0) { printf(_("Unicode border line style is \"%s\".\n"), - _unicode_linestyle2string(popt->topt.unicode_border_linestyle)); + _unicode_linestyle2string(popt->topt.unicode_border_linestyle)); } else if (strcmp(param, "unicode_column_linestyle") == 0) { printf(_("Unicode column line style is \"%s\".\n"), - _unicode_linestyle2string(popt->topt.unicode_column_linestyle)); + _unicode_linestyle2string(popt->topt.unicode_column_linestyle)); } else if (strcmp(param, "unicode_header_linestyle") == 0) { printf(_("Unicode header line style is \"%s\".\n"), - _unicode_linestyle2string(popt->topt.unicode_header_linestyle)); + _unicode_linestyle2string(popt->topt.unicode_header_linestyle)); } else @@ -4578,7 +4578,7 @@ get_create_object_cmd(EditableObjectType obj_type, Oid oid, "WHEN 'check_option=cascaded' = ANY (c.reloptions) THEN 'CASCADED'::text ELSE NULL END AS checkoption " "FROM pg_catalog.pg_class c " "LEFT JOIN pg_catalog.pg_namespace n " - "ON c.relnamespace = n.oid WHERE c.oid = %u", + "ON c.relnamespace = n.oid WHERE c.oid = %u", oid); } else if (pset.sversion >= 90200) @@ -4590,7 +4590,7 @@ get_create_object_cmd(EditableObjectType obj_type, Oid oid, "NULL AS checkoption " "FROM pg_catalog.pg_class c " "LEFT JOIN pg_catalog.pg_namespace n " - "ON c.relnamespace = n.oid WHERE c.oid = %u", + "ON c.relnamespace = n.oid WHERE c.oid = %u", oid); } else @@ -4602,7 +4602,7 @@ get_create_object_cmd(EditableObjectType obj_type, Oid oid, "NULL AS checkoption " "FROM pg_catalog.pg_class c " "LEFT JOIN pg_catalog.pg_namespace n " - "ON c.relnamespace = n.oid WHERE c.oid = %u", + "ON c.relnamespace = n.oid WHERE c.oid = %u", oid); } break; diff --git a/src/bin/psql/crosstabview.c b/src/bin/psql/crosstabview.c index 2794eb6b876..ed61c346eed 100644 --- a/src/bin/psql/crosstabview.c +++ b/src/bin/psql/crosstabview.c @@ -78,7 +78,7 @@ typedef struct _avl_tree static bool printCrosstab(const PGresult *results, - int num_columns, pivot_field *piv_columns, int field_for_columns, + int num_columns, pivot_field *piv_columns, int field_for_columns, int num_rows, pivot_field *piv_rows, int field_for_rows, int field_for_data); static void avlInit(avl_tree *tree); @@ -283,7 +283,7 @@ error_return: */ static bool printCrosstab(const PGresult *results, - int num_columns, pivot_field *piv_columns, int field_for_columns, + int num_columns, pivot_field *piv_columns, int field_for_columns, int num_rows, pivot_field *piv_rows, int field_for_rows, int field_for_data) { @@ -547,7 +547,7 @@ avlInsertNode(avl_tree *tree, avl_node **node, pivot_field field) if (cmp != 0) { avlInsertNode(tree, - cmp > 0 ? ¤t->children[1] : ¤t->children[0], + cmp > 0 ? ¤t->children[1] : ¤t->children[0], field); avlAdjustBalance(tree, node); } diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 17bfedb4338..e6833eced54 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -69,7 +69,7 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem) printfPQExpBuffer(&buf, "SELECT n.nspname as \"%s\",\n" " p.proname AS \"%s\",\n" - " pg_catalog.format_type(p.prorettype, NULL) AS \"%s\",\n", + " pg_catalog.format_type(p.prorettype, NULL) AS \"%s\",\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Result data type")); @@ -78,7 +78,7 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem) appendPQExpBuffer(&buf, " CASE WHEN p.pronargs = 0\n" " THEN CAST('*' AS pg_catalog.text)\n" - " ELSE pg_catalog.pg_get_function_arguments(p.oid)\n" + " ELSE pg_catalog.pg_get_function_arguments(p.oid)\n" " END AS \"%s\",\n", gettext_noop("Argument data types")); else if (pset.sversion >= 80200) @@ -88,7 +88,7 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem) " ELSE\n" " pg_catalog.array_to_string(ARRAY(\n" " SELECT\n" - " pg_catalog.format_type(p.proargtypes[s.i], NULL)\n" + " pg_catalog.format_type(p.proargtypes[s.i], NULL)\n" " FROM\n" " pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n" " ), ', ')\n" @@ -96,13 +96,13 @@ describeAggregates(const char *pattern, bool verbose, bool showSystem) gettext_noop("Argument data types")); else appendPQExpBuffer(&buf, - " pg_catalog.format_type(p.proargtypes[0], NULL) AS \"%s\",\n", + " pg_catalog.format_type(p.proargtypes[0], NULL) AS \"%s\",\n", gettext_noop("Argument data types")); appendPQExpBuffer(&buf, - " pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n" + " pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n" "FROM pg_catalog.pg_proc p\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n" "WHERE p.proisagg\n", gettext_noop("Description")); @@ -167,7 +167,7 @@ describeAccessMethods(const char *pattern, bool verbose) { appendPQExpBuffer(&buf, ",\n amhandler AS \"%s\",\n" - " pg_catalog.obj_description(oid, 'pg_am') AS \"%s\"", + " pg_catalog.obj_description(oid, 'pg_am') AS \"%s\"", gettext_noop("Handler"), gettext_noop("Description")); } @@ -223,15 +223,15 @@ describeTablespaces(const char *pattern, bool verbose) if (pset.sversion >= 90200) printfPQExpBuffer(&buf, "SELECT spcname AS \"%s\",\n" - " pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n" - " pg_catalog.pg_tablespace_location(oid) AS \"%s\"", + " pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n" + " pg_catalog.pg_tablespace_location(oid) AS \"%s\"", gettext_noop("Name"), gettext_noop("Owner"), gettext_noop("Location")); else printfPQExpBuffer(&buf, "SELECT spcname AS \"%s\",\n" - " pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n" + " pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n" " spclocation AS \"%s\"", gettext_noop("Name"), gettext_noop("Owner"), @@ -255,7 +255,7 @@ describeTablespaces(const char *pattern, bool verbose) if (verbose && pset.sversion >= 80200) appendPQExpBuffer(&buf, - ",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"", + ",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"", gettext_noop("Description")); appendPQExpBufferStr(&buf, @@ -344,8 +344,8 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool if (pset.sversion >= 80400) appendPQExpBuffer(&buf, - " pg_catalog.pg_get_function_result(p.oid) as \"%s\",\n" - " pg_catalog.pg_get_function_arguments(p.oid) as \"%s\",\n" + " pg_catalog.pg_get_function_result(p.oid) as \"%s\",\n" + " pg_catalog.pg_get_function_arguments(p.oid) as \"%s\",\n" " CASE\n" " WHEN p.proisagg THEN '%s'\n" " WHEN p.proiswindow THEN '%s'\n" @@ -362,22 +362,22 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool gettext_noop("Type")); else if (pset.sversion >= 80100) appendPQExpBuffer(&buf, - " CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n" - " pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n" + " CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n" + " pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n" " CASE WHEN proallargtypes IS NOT NULL THEN\n" " pg_catalog.array_to_string(ARRAY(\n" " SELECT\n" " CASE\n" " WHEN p.proargmodes[s.i] = 'i' THEN ''\n" - " WHEN p.proargmodes[s.i] = 'o' THEN 'OUT '\n" - " WHEN p.proargmodes[s.i] = 'b' THEN 'INOUT '\n" - " WHEN p.proargmodes[s.i] = 'v' THEN 'VARIADIC '\n" + " WHEN p.proargmodes[s.i] = 'o' THEN 'OUT '\n" + " WHEN p.proargmodes[s.i] = 'b' THEN 'INOUT '\n" + " WHEN p.proargmodes[s.i] = 'v' THEN 'VARIADIC '\n" " END ||\n" " CASE\n" - " WHEN COALESCE(p.proargnames[s.i], '') = '' THEN ''\n" + " WHEN COALESCE(p.proargnames[s.i], '') = '' THEN ''\n" " ELSE p.proargnames[s.i] || ' '\n" " END ||\n" - " pg_catalog.format_type(p.proallargtypes[s.i], NULL)\n" + " pg_catalog.format_type(p.proallargtypes[s.i], NULL)\n" " FROM\n" " pg_catalog.generate_series(1, pg_catalog.array_upper(p.proallargtypes, 1)) AS s(i)\n" " ), ', ')\n" @@ -385,10 +385,10 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool " pg_catalog.array_to_string(ARRAY(\n" " SELECT\n" " CASE\n" - " WHEN COALESCE(p.proargnames[s.i+1], '') = '' THEN ''\n" + " WHEN COALESCE(p.proargnames[s.i+1], '') = '' THEN ''\n" " ELSE p.proargnames[s.i+1] || ' '\n" " END ||\n" - " pg_catalog.format_type(p.proargtypes[s.i], NULL)\n" + " pg_catalog.format_type(p.proargtypes[s.i], NULL)\n" " FROM\n" " pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n" " ), ', ')\n" @@ -407,9 +407,9 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool gettext_noop("Type")); else appendPQExpBuffer(&buf, - " CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n" - " pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n" - " pg_catalog.oidvectortypes(p.proargtypes) as \"%s\",\n" + " CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n" + " pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n" + " pg_catalog.oidvectortypes(p.proargtypes) as \"%s\",\n" " CASE\n" " WHEN p.proisagg THEN '%s'\n" " WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN '%s'\n" @@ -447,8 +447,8 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool gettext_noop("unsafe"), gettext_noop("Parallel")); appendPQExpBuffer(&buf, - ",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\"" - ",\n CASE WHEN prosecdef THEN '%s' ELSE '%s' END AS \"%s\"", + ",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\"" + ",\n CASE WHEN prosecdef THEN '%s' ELSE '%s' END AS \"%s\"", gettext_noop("Owner"), gettext_noop("definer"), gettext_noop("invoker"), @@ -458,7 +458,7 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool appendPQExpBuffer(&buf, ",\n l.lanname as \"%s\"" ",\n p.prosrc as \"%s\"" - ",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"", + ",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"", gettext_noop("Language"), gettext_noop("Source code"), gettext_noop("Description")); @@ -466,11 +466,11 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_proc p" - "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"); + "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"); if (verbose) appendPQExpBufferStr(&buf, - " LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n"); + " LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n"); have_where = false; @@ -530,7 +530,7 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool if (needs_or) appendPQExpBufferStr(&buf, " OR "); appendPQExpBufferStr(&buf, - "p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype\n"); + "p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype\n"); needs_or = true; } if (showWindow) @@ -634,7 +634,7 @@ describeTypes(const char *pattern, bool verbose, bool showSystem) if (verbose) { appendPQExpBuffer(&buf, - " pg_catalog.pg_get_userbyid(t.typowner) AS \"%s\",\n", + " pg_catalog.pg_get_userbyid(t.typowner) AS \"%s\",\n", gettext_noop("Owner")); } if (verbose && pset.sversion >= 90200) @@ -644,11 +644,11 @@ describeTypes(const char *pattern, bool verbose, bool showSystem) } appendPQExpBuffer(&buf, - " pg_catalog.obj_description(t.oid, 'pg_type') as \"%s\"\n", + " pg_catalog.obj_description(t.oid, 'pg_type') as \"%s\"\n", gettext_noop("Description")); appendPQExpBufferStr(&buf, "FROM pg_catalog.pg_type t\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n"); + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n"); /* * do not include complex types (typrelid!=0) unless they are standalone @@ -726,7 +726,7 @@ describeOperators(const char *pattern, bool verbose, bool showSystem) " o.oprname AS \"%s\",\n" " CASE WHEN o.oprkind='l' THEN NULL ELSE pg_catalog.format_type(o.oprleft, NULL) END AS \"%s\",\n" " CASE WHEN o.oprkind='r' THEN NULL ELSE pg_catalog.format_type(o.oprright, NULL) END AS \"%s\",\n" - " pg_catalog.format_type(o.oprresult, NULL) AS \"%s\",\n", + " pg_catalog.format_type(o.oprresult, NULL) AS \"%s\",\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Left arg type"), @@ -739,10 +739,10 @@ describeOperators(const char *pattern, bool verbose, bool showSystem) gettext_noop("Function")); appendPQExpBuffer(&buf, - " coalesce(pg_catalog.obj_description(o.oid, 'pg_operator'),\n" - " pg_catalog.obj_description(o.oprcode, 'pg_proc')) AS \"%s\"\n" + " coalesce(pg_catalog.obj_description(o.oid, 'pg_operator'),\n" + " pg_catalog.obj_description(o.oprcode, 'pg_proc')) AS \"%s\"\n" "FROM pg_catalog.pg_operator o\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = o.oprnamespace\n", + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = o.oprnamespace\n", gettext_noop("Description")); if (!showSystem && !pattern) @@ -787,8 +787,8 @@ listAllDbs(const char *pattern, bool verbose) printfPQExpBuffer(&buf, "SELECT d.datname as \"%s\",\n" - " pg_catalog.pg_get_userbyid(d.datdba) as \"%s\",\n" - " pg_catalog.pg_encoding_to_char(d.encoding) as \"%s\",\n", + " pg_catalog.pg_get_userbyid(d.datdba) as \"%s\",\n" + " pg_catalog.pg_encoding_to_char(d.encoding) as \"%s\",\n", gettext_noop("Name"), gettext_noop("Owner"), gettext_noop("Encoding")); @@ -819,7 +819,7 @@ listAllDbs(const char *pattern, bool verbose) "\nFROM pg_catalog.pg_database d\n"); if (verbose && pset.sversion >= 80000) appendPQExpBufferStr(&buf, - " JOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid\n"); + " JOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid\n"); if (pattern) processSQLNamePattern(pset.db, &buf, pattern, false, false, @@ -867,8 +867,8 @@ permissionsList(const char *pattern) " WHEN " CppAsString2(RELKIND_VIEW) " THEN '%s'" " WHEN " CppAsString2(RELKIND_MATVIEW) " THEN '%s'" " WHEN " CppAsString2(RELKIND_SEQUENCE) " THEN '%s'" - " WHEN " CppAsString2(RELKIND_FOREIGN_TABLE) " THEN '%s'" - " WHEN " CppAsString2(RELKIND_PARTITIONED_TABLE) " THEN '%s'" + " WHEN " CppAsString2(RELKIND_FOREIGN_TABLE) " THEN '%s'" + " WHEN " CppAsString2(RELKIND_PARTITIONED_TABLE) " THEN '%s'" " END as \"%s\",\n" " ", gettext_noop("Schema"), @@ -909,7 +909,7 @@ permissionsList(const char *pattern) " ELSE E''\n" " END" " || CASE WHEN polroles <> '{0}' THEN\n" - " E'\\n to: ' || pg_catalog.array_to_string(\n" + " E'\\n to: ' || pg_catalog.array_to_string(\n" " ARRAY(\n" " SELECT rolname\n" " FROM pg_catalog.pg_roles\n" @@ -943,7 +943,7 @@ permissionsList(const char *pattern) " ELSE E''\n" " END" " || CASE WHEN polroles <> '{0}' THEN\n" - " E'\\n to: ' || pg_catalog.array_to_string(\n" + " E'\\n to: ' || pg_catalog.array_to_string(\n" " ARRAY(\n" " SELECT rolname\n" " FROM pg_catalog.pg_roles\n" @@ -958,7 +958,7 @@ permissionsList(const char *pattern) gettext_noop("Policies")); appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_class c\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" "WHERE c.relkind IN (" CppAsString2(RELKIND_RELATION) "," CppAsString2(RELKIND_VIEW) "," @@ -975,7 +975,7 @@ permissionsList(const char *pattern) */ processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "c.relname", NULL, - "n.nspname !~ '^pg_' AND pg_catalog.pg_table_is_visible(c.oid)"); + "n.nspname !~ '^pg_' AND pg_catalog.pg_table_is_visible(c.oid)"); appendPQExpBufferStr(&buf, "ORDER BY 1, 2;"); @@ -1027,7 +1027,7 @@ listDefaultACLs(const char *pattern) initPQExpBuffer(&buf); printfPQExpBuffer(&buf, - "SELECT pg_catalog.pg_get_userbyid(d.defaclrole) AS \"%s\",\n" + "SELECT pg_catalog.pg_get_userbyid(d.defaclrole) AS \"%s\",\n" " n.nspname AS \"%s\",\n" " CASE d.defaclobjtype WHEN '%c' THEN '%s' WHEN '%c' THEN '%s' WHEN '%c' THEN '%s' WHEN '%c' THEN '%s' WHEN '%c' THEN '%s' END AS \"%s\",\n" " ", @@ -1174,7 +1174,7 @@ objectDescription(const char *pattern, bool showSystem) if (!showSystem && !pattern) appendPQExpBufferStr(&buf, " AND n.nspname <> 'pg_catalog'\n" - " AND n.nspname <> 'information_schema'\n"); + " AND n.nspname <> 'information_schema'\n"); processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "o.opcname", NULL, @@ -1190,7 +1190,7 @@ objectDescription(const char *pattern, bool showSystem) /* Operator family descriptions */ appendPQExpBuffer(&buf, "UNION ALL\n" - " SELECT opf.oid as oid, opf.tableoid as tableoid,\n" + " SELECT opf.oid as oid, opf.tableoid as tableoid,\n" " n.nspname as nspname,\n" " CAST(opf.opfname AS pg_catalog.text) AS name,\n" " CAST('%s' AS pg_catalog.text) as object\n" @@ -1203,7 +1203,7 @@ objectDescription(const char *pattern, bool showSystem) if (!showSystem && !pattern) appendPQExpBufferStr(&buf, " AND n.nspname <> 'pg_catalog'\n" - " AND n.nspname <> 'information_schema'\n"); + " AND n.nspname <> 'information_schema'\n"); processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "opf.opfname", NULL, @@ -1218,8 +1218,8 @@ objectDescription(const char *pattern, bool showSystem) " CAST(r.rulename AS pg_catalog.text) as name," " CAST('%s' AS pg_catalog.text) as object\n" " FROM pg_catalog.pg_rewrite r\n" - " JOIN pg_catalog.pg_class c ON c.oid = r.ev_class\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" + " JOIN pg_catalog.pg_class c ON c.oid = r.ev_class\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n" " WHERE r.rulename != '_RETURN'\n", gettext_noop("rule")); @@ -1239,8 +1239,8 @@ objectDescription(const char *pattern, bool showSystem) " CAST(t.tgname AS pg_catalog.text) as name," " CAST('%s' AS pg_catalog.text) as object\n" " FROM pg_catalog.pg_trigger t\n" - " JOIN pg_catalog.pg_class c ON c.oid = t.tgrelid\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n", + " JOIN pg_catalog.pg_class c ON c.oid = t.tgrelid\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n", gettext_noop("trigger")); if (!showSystem && !pattern) @@ -1297,7 +1297,7 @@ describeTableDetails(const char *pattern, bool verbose, bool showSystem) " n.nspname,\n" " c.relname\n" "FROM pg_catalog.pg_class c\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n"); + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n"); if (!showSystem && !pattern) appendPQExpBufferStr(&buf, "WHERE n.nspname <> 'pg_catalog'\n" @@ -1409,13 +1409,13 @@ describeOneTableDetails(const char *schemaname, if (pset.sversion >= 90500) { printfPQExpBuffer(&buf, - "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " - "c.relhastriggers, c.relrowsecurity, c.relforcerowsecurity, " + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "c.relhastriggers, c.relrowsecurity, c.relforcerowsecurity, " "c.relhasoids, %s, c.reltablespace, " "CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END, " "c.relpersistence, c.relreplident\n" "FROM pg_catalog.pg_class c\n " - "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" "WHERE c.oid = '%s';", (verbose ? "pg_catalog.array_to_string(c.reloptions || " @@ -1426,13 +1426,13 @@ describeOneTableDetails(const char *schemaname, else if (pset.sversion >= 90400) { printfPQExpBuffer(&buf, - "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " "c.relhastriggers, false, false, c.relhasoids, " "%s, c.reltablespace, " "CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END, " "c.relpersistence, c.relreplident\n" "FROM pg_catalog.pg_class c\n " - "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" "WHERE c.oid = '%s';", (verbose ? "pg_catalog.array_to_string(c.reloptions || " @@ -1443,13 +1443,13 @@ describeOneTableDetails(const char *schemaname, else if (pset.sversion >= 90100) { printfPQExpBuffer(&buf, - "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " "c.relhastriggers, false, false, c.relhasoids, " "%s, c.reltablespace, " "CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END, " "c.relpersistence\n" "FROM pg_catalog.pg_class c\n " - "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" "WHERE c.oid = '%s';", (verbose ? "pg_catalog.array_to_string(c.reloptions || " @@ -1460,12 +1460,12 @@ describeOneTableDetails(const char *schemaname, else if (pset.sversion >= 90000) { printfPQExpBuffer(&buf, - "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " "c.relhastriggers, false, false, c.relhasoids, " "%s, c.reltablespace, " "CASE WHEN c.reloftype = 0 THEN '' ELSE c.reloftype::pg_catalog.regtype::pg_catalog.text END\n" "FROM pg_catalog.pg_class c\n " - "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" "WHERE c.oid = '%s';", (verbose ? "pg_catalog.array_to_string(c.reloptions || " @@ -1476,11 +1476,11 @@ describeOneTableDetails(const char *schemaname, else if (pset.sversion >= 80400) { printfPQExpBuffer(&buf, - "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " + "SELECT c.relchecks, c.relkind, c.relhasindex, c.relhasrules, " "c.relhastriggers, false, false, c.relhasoids, " "%s, c.reltablespace\n" "FROM pg_catalog.pg_class c\n " - "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" + "LEFT JOIN pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid)\n" "WHERE c.oid = '%s';", (verbose ? "pg_catalog.array_to_string(c.reloptions || " @@ -1491,18 +1491,18 @@ describeOneTableDetails(const char *schemaname, else if (pset.sversion >= 80200) { printfPQExpBuffer(&buf, - "SELECT relchecks, relkind, relhasindex, relhasrules, " + "SELECT relchecks, relkind, relhasindex, relhasrules, " "reltriggers <> 0, false, false, relhasoids, " "%s, reltablespace\n" "FROM pg_catalog.pg_class WHERE oid = '%s';", (verbose ? - "pg_catalog.array_to_string(reloptions, E', ')" : "''"), + "pg_catalog.array_to_string(reloptions, E', ')" : "''"), oid); } else if (pset.sversion >= 80000) { printfPQExpBuffer(&buf, - "SELECT relchecks, relkind, relhasindex, relhasrules, " + "SELECT relchecks, relkind, relhasindex, relhasrules, " "reltriggers <> 0, false, false, relhasoids, " "'', reltablespace\n" "FROM pg_catalog.pg_class WHERE oid = '%s';", @@ -1511,7 +1511,7 @@ describeOneTableDetails(const char *schemaname, else { printfPQExpBuffer(&buf, - "SELECT relchecks, relkind, relhasindex, relhasrules, " + "SELECT relchecks, relkind, relhasindex, relhasrules, " "reltriggers <> 0, false, false, relhasoids, " "'', ''\n" "FROM pg_catalog.pg_class WHERE oid = '%s';", @@ -1759,7 +1759,7 @@ describeOneTableDetails(const char *schemaname, PGresult *result; printfPQExpBuffer(&buf, - "SELECT pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid, true);", + "SELECT pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid, true);", oid); result = PSQLexec(buf.data); if (!result) @@ -1869,7 +1869,7 @@ describeOneTableDetails(const char *schemaname, " FROM pg_catalog.pg_class c" " JOIN pg_catalog.pg_inherits" " ON c.oid = inhrelid" - " WHERE c.oid = '%s' AND c.relispartition;", oid); + " WHERE c.oid = '%s' AND c.relispartition;", oid); else printfPQExpBuffer(&buf, "SELECT inhparent::pg_catalog.regclass," @@ -1877,7 +1877,7 @@ describeOneTableDetails(const char *schemaname, " FROM pg_catalog.pg_class c" " JOIN pg_catalog.pg_inherits" " ON c.oid = inhrelid" - " WHERE c.oid = '%s' AND c.relispartition;", oid); + " WHERE c.oid = '%s' AND c.relispartition;", oid); result = PSQLexec(buf.data); if (!result) goto error_return; @@ -1912,7 +1912,7 @@ describeOneTableDetails(const char *schemaname, char *partkeydef; printfPQExpBuffer(&buf, - "SELECT pg_catalog.pg_get_partkeydef('%s'::pg_catalog.oid);", + "SELECT pg_catalog.pg_get_partkeydef('%s'::pg_catalog.oid);", oid); result = PSQLexec(buf.data); if (!result || PQntuples(result) != 1) @@ -1930,7 +1930,7 @@ describeOneTableDetails(const char *schemaname, PGresult *result; printfPQExpBuffer(&buf, - "SELECT i.indisunique, i.indisprimary, i.indisclustered, "); + "SELECT i.indisunique, i.indisprimary, i.indisclustered, "); if (pset.sversion >= 80200) appendPQExpBufferStr(&buf, "i.indisvalid,\n"); else @@ -1938,20 +1938,20 @@ describeOneTableDetails(const char *schemaname, if (pset.sversion >= 90000) appendPQExpBufferStr(&buf, " (NOT i.indimmediate) AND " - "EXISTS (SELECT 1 FROM pg_catalog.pg_constraint " + "EXISTS (SELECT 1 FROM pg_catalog.pg_constraint " "WHERE conrelid = i.indrelid AND " "conindid = i.indexrelid AND " "contype IN ('p','u','x') AND " "condeferrable) AS condeferrable,\n" " (NOT i.indimmediate) AND " - "EXISTS (SELECT 1 FROM pg_catalog.pg_constraint " + "EXISTS (SELECT 1 FROM pg_catalog.pg_constraint " "WHERE conrelid = i.indrelid AND " "conindid = i.indexrelid AND " "contype IN ('p','u','x') AND " "condeferred) AS condeferred,\n"); else appendPQExpBufferStr(&buf, - " false AS condeferrable, false AS condeferred,\n"); + " false AS condeferrable, false AS condeferred,\n"); if (pset.sversion >= 90400) appendPQExpBuffer(&buf, "i.indisreplident,\n"); @@ -1959,9 +1959,9 @@ describeOneTableDetails(const char *schemaname, appendPQExpBuffer(&buf, "false AS indisreplident,\n"); appendPQExpBuffer(&buf, " a.amname, c2.relname, " - "pg_catalog.pg_get_expr(i.indpred, i.indrelid, true)\n" + "pg_catalog.pg_get_expr(i.indpred, i.indrelid, true)\n" "FROM pg_catalog.pg_index i, pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg_am a\n" - "WHERE i.indexrelid = c.oid AND c.oid = '%s' AND c.relam = a.oid\n" + "WHERE i.indexrelid = c.oid AND c.oid = '%s' AND c.relam = a.oid\n" "AND i.indrelid = c2.oid;", oid); @@ -2034,13 +2034,13 @@ describeOneTableDetails(const char *schemaname, "\n pg_catalog.quote_ident(attname)," "\n d.deptype" "\nFROM pg_catalog.pg_class c" - "\nINNER JOIN pg_catalog.pg_depend d ON c.oid=d.refobjid" - "\nINNER JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace" + "\nINNER JOIN pg_catalog.pg_depend d ON c.oid=d.refobjid" + "\nINNER JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace" "\nINNER JOIN pg_catalog.pg_attribute a ON (" "\n a.attrelid=c.oid AND" "\n a.attnum=d.refobjsubid)" - "\nWHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass" - "\n AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass" + "\nWHERE d.classid='pg_catalog.pg_class'::pg_catalog.regclass" + "\n AND d.refclassid='pg_catalog.pg_class'::pg_catalog.regclass" "\n AND d.objid=%s" "\n AND d.deptype IN ('a', 'i')", oid); @@ -2093,12 +2093,12 @@ describeOneTableDetails(const char *schemaname, appendPQExpBufferStr(&buf, "pg_catalog.pg_get_indexdef(i.indexrelid, 0, true),\n "); if (pset.sversion >= 90000) appendPQExpBufferStr(&buf, - "pg_catalog.pg_get_constraintdef(con.oid, true), " + "pg_catalog.pg_get_constraintdef(con.oid, true), " "contype, condeferrable, condeferred"); else appendPQExpBufferStr(&buf, - "null AS constraintdef, null AS contype, " - "false AS condeferrable, false AS condeferred"); + "null AS constraintdef, null AS contype, " + "false AS condeferrable, false AS condeferred"); if (pset.sversion >= 90400) appendPQExpBufferStr(&buf, ", i.indisreplident"); else @@ -2112,7 +2112,7 @@ describeOneTableDetails(const char *schemaname, " LEFT JOIN pg_catalog.pg_constraint con ON (conrelid = i.indrelid AND conindid = i.indexrelid AND contype IN ('p','u','x'))\n"); appendPQExpBuffer(&buf, "WHERE c.oid = '%s' AND c.oid = i.indrelid AND i.indexrelid = c2.oid\n" - "ORDER BY i.indisprimary DESC, i.indisunique DESC, c2.relname;", + "ORDER BY i.indisprimary DESC, i.indisunique DESC, c2.relname;", oid); result = PSQLexec(buf.data); if (!result) @@ -2181,7 +2181,7 @@ describeOneTableDetails(const char *schemaname, /* Print tablespace of the index on the same line */ if (pset.sversion >= 80000) add_tablespace_footer(&cont, RELKIND_INDEX, - atooid(PQgetvalue(result, i, 11)), + atooid(PQgetvalue(result, i, 11)), false); } } @@ -2225,9 +2225,9 @@ describeOneTableDetails(const char *schemaname, { printfPQExpBuffer(&buf, "SELECT conname,\n" - " pg_catalog.pg_get_constraintdef(r.oid, true) as condef\n" + " pg_catalog.pg_get_constraintdef(r.oid, true) as condef\n" "FROM pg_catalog.pg_constraint r\n" - "WHERE r.conrelid = '%s' AND r.contype = 'f' ORDER BY 1;", + "WHERE r.conrelid = '%s' AND r.contype = 'f' ORDER BY 1;", oid); result = PSQLexec(buf.data); if (!result) @@ -2255,10 +2255,10 @@ describeOneTableDetails(const char *schemaname, if (tableinfo.hastriggers) { printfPQExpBuffer(&buf, - "SELECT conname, conrelid::pg_catalog.regclass,\n" - " pg_catalog.pg_get_constraintdef(c.oid, true) as condef\n" + "SELECT conname, conrelid::pg_catalog.regclass,\n" + " pg_catalog.pg_get_constraintdef(c.oid, true) as condef\n" "FROM pg_catalog.pg_constraint c\n" - "WHERE c.confrelid = '%s' AND c.contype = 'f' ORDER BY 1;", + "WHERE c.confrelid = '%s' AND c.contype = 'f' ORDER BY 1;", oid); result = PSQLexec(buf.data); if (!result) @@ -2289,8 +2289,8 @@ describeOneTableDetails(const char *schemaname, printfPQExpBuffer(&buf, "SELECT pol.polname, pol.polpermissive,\n" "CASE WHEN pol.polroles = '{0}' THEN NULL ELSE array_to_string(array(select rolname from pg_roles where oid = any (pol.polroles) order by 1),',') END,\n" - "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),\n" - "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),\n" + "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),\n" + "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),\n" "CASE pol.polcmd\n" "WHEN 'r' THEN 'SELECT'\n" "WHEN 'a' THEN 'INSERT'\n" @@ -2302,10 +2302,10 @@ describeOneTableDetails(const char *schemaname, oid); else printfPQExpBuffer(&buf, - "SELECT pol.polname, 't' as polpermissive,\n" + "SELECT pol.polname, 't' as polpermissive,\n" "CASE WHEN pol.polroles = '{0}' THEN NULL ELSE array_to_string(array(select rolname from pg_roles where oid = any (pol.polroles) order by 1),',') END,\n" - "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),\n" - "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),\n" + "pg_catalog.pg_get_expr(pol.polqual, pol.polrelid),\n" + "pg_catalog.pg_get_expr(pol.polwithcheck, pol.polrelid),\n" "CASE pol.polcmd\n" "WHEN 'r' THEN 'SELECT'\n" "WHEN 'a' THEN 'INSERT'\n" @@ -2386,7 +2386,7 @@ describeOneTableDetails(const char *schemaname, " (SELECT pg_catalog.string_agg(pg_catalog.quote_ident(attname),', ')\n" " FROM pg_catalog.unnest(stxkeys) s(attnum)\n" " JOIN pg_catalog.pg_attribute a ON (stxrelid = a.attrelid AND\n" - " a.attnum = s.attnum AND NOT attisdropped)) AS columns,\n" + " a.attnum = s.attnum AND NOT attisdropped)) AS columns,\n" " (stxkind @> '{d}') AS ndist_enabled,\n" " (stxkind @> '{f}') AS deps_enabled\n" "FROM pg_catalog.pg_statistic_ext stat " @@ -2538,12 +2538,12 @@ describeOneTableDetails(const char *schemaname, printfPQExpBuffer(&buf, "SELECT pubname\n" "FROM pg_catalog.pg_publication p\n" - "JOIN pg_catalog.pg_publication_rel pr ON p.oid = pr.prpubid\n" + "JOIN pg_catalog.pg_publication_rel pr ON p.oid = pr.prpubid\n" "WHERE pr.prrelid = '%s'\n" "UNION ALL\n" "SELECT pubname\n" "FROM pg_catalog.pg_publication p\n" - "WHERE p.puballtables AND pg_relation_is_publishable('%s')\n" + "WHERE p.puballtables AND pg_relation_is_publishable('%s')\n" "ORDER BY 1;", oid, oid); @@ -2582,7 +2582,7 @@ describeOneTableDetails(const char *schemaname, printfPQExpBuffer(&buf, "SELECT r.rulename, trim(trailing ';' from pg_catalog.pg_get_ruledef(r.oid, true))\n" "FROM pg_catalog.pg_rewrite r\n" - "WHERE r.ev_class = '%s' AND r.rulename != '_RETURN' ORDER BY 1;", + "WHERE r.ev_class = '%s' AND r.rulename != '_RETURN' ORDER BY 1;", oid); result = PSQLexec(buf.data); if (!result) @@ -2767,7 +2767,7 @@ describeOneTableDetails(const char *schemaname, " array_to_string(ARRAY(SELECT " " quote_ident(option_name) || ' ' || " " quote_literal(option_value) FROM " - " pg_options_to_table(ftoptions)), ', ') " + " pg_options_to_table(ftoptions)), ', ') " "FROM pg_catalog.pg_foreign_table f,\n" " pg_catalog.pg_foreign_server s\n" "WHERE f.ftrelid = %s AND s.oid = f.ftserver;", @@ -2799,9 +2799,9 @@ describeOneTableDetails(const char *schemaname, /* print inherited tables (exclude, if parent is a partitioned table) */ printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass" - " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" + " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" " WHERE c.oid=i.inhparent AND i.inhrelid = '%s'" - " AND c.relkind != " CppAsString2(RELKIND_PARTITIONED_TABLE) + " AND c.relkind != " CppAsString2(RELKIND_PARTITIONED_TABLE) " ORDER BY inhseqno;", oid); result = PSQLexec(buf.data); @@ -2835,18 +2835,18 @@ describeOneTableDetails(const char *schemaname, if (pset.sversion >= 100000) printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass, pg_get_expr(c.relpartbound, c.oid)" - " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" + " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" " WHERE c.oid=i.inhrelid AND" " i.inhparent = '%s' AND" - " EXISTS (SELECT 1 FROM pg_class c WHERE c.oid = '%s')" + " EXISTS (SELECT 1 FROM pg_class c WHERE c.oid = '%s')" " ORDER BY c.oid::pg_catalog.regclass::pg_catalog.text;", oid, oid); else if (pset.sversion >= 80300) printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass" - " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" + " FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i" " WHERE c.oid=i.inhrelid AND" " i.inhparent = '%s' AND" - " EXISTS (SELECT 1 FROM pg_class c WHERE c.oid = '%s')" + " EXISTS (SELECT 1 FROM pg_class c WHERE c.oid = '%s')" " ORDER BY c.oid::pg_catalog.regclass::pg_catalog.text;", oid, oid); else printfPQExpBuffer(&buf, "SELECT c.oid::pg_catalog.regclass FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhrelid AND i.inhparent = '%s' ORDER BY c.relname;", oid); @@ -3074,7 +3074,7 @@ describeRoles(const char *pattern, bool verbose, bool showSystem) " r.rolconnlimit, r.rolvaliduntil,\n" " ARRAY(SELECT b.rolname\n" " FROM pg_catalog.pg_auth_members m\n" - " JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)\n" + " JOIN pg_catalog.pg_roles b ON (m.roleid = b.oid)\n" " WHERE m.member = r.oid) as memberof"); if (verbose && pset.sversion >= 80200) @@ -3106,7 +3106,7 @@ describeRoles(const char *pattern, bool verbose, bool showSystem) "SELECT u.usename AS rolname,\n" " u.usesuper AS rolsuper,\n" " true AS rolinherit, false AS rolcreaterole,\n" - " u.usecreatedb AS rolcreatedb, true AS rolcanlogin,\n" + " u.usecreatedb AS rolcreatedb, true AS rolcanlogin,\n" " -1 AS rolconnlimit," " u.valuntil as rolvaliduntil,\n" " ARRAY(SELECT g.groname FROM pg_catalog.pg_group g WHERE u.usesysid = ANY(g.grolist)) as memberof" @@ -3233,15 +3233,15 @@ listDbRoleSettings(const char *pattern, const char *pattern2) bool havewhere; printfPQExpBuffer(&buf, "SELECT rolname AS \"%s\", datname AS \"%s\",\n" - "pg_catalog.array_to_string(setconfig, E'\\n') AS \"%s\"\n" + "pg_catalog.array_to_string(setconfig, E'\\n') AS \"%s\"\n" "FROM pg_db_role_setting AS s\n" - "LEFT JOIN pg_database ON pg_database.oid = setdatabase\n" + "LEFT JOIN pg_database ON pg_database.oid = setdatabase\n" "LEFT JOIN pg_roles ON pg_roles.oid = setrole\n", gettext_noop("Role"), gettext_noop("Database"), gettext_noop("Settings")); havewhere = processSQLNamePattern(pset.db, &buf, pattern, false, false, - NULL, "pg_roles.rolname", NULL, NULL); + NULL, "pg_roles.rolname", NULL, NULL); processSQLNamePattern(pset.db, &buf, pattern2, havewhere, false, NULL, "pg_database.datname", NULL, NULL); appendPQExpBufferStr(&buf, "ORDER BY 1, 2;"); @@ -3249,7 +3249,7 @@ listDbRoleSettings(const char *pattern, const char *pattern2) else { fprintf(pset.queryFout, - _("No per-database role settings support in this server version.\n")); + _("No per-database role settings support in this server version.\n")); return false; } @@ -3328,8 +3328,8 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys " WHEN " CppAsString2(RELKIND_INDEX) " THEN '%s'" " WHEN " CppAsString2(RELKIND_SEQUENCE) " THEN '%s'" " WHEN 's' THEN '%s'" - " WHEN " CppAsString2(RELKIND_FOREIGN_TABLE) " THEN '%s'" - " WHEN " CppAsString2(RELKIND_PARTITIONED_TABLE) " THEN '%s'" + " WHEN " CppAsString2(RELKIND_FOREIGN_TABLE) " THEN '%s'" + " WHEN " CppAsString2(RELKIND_PARTITIONED_TABLE) " THEN '%s'" " END as \"%s\",\n" " pg_catalog.pg_get_userbyid(c.relowner) as \"%s\"", gettext_noop("Schema"), @@ -3366,17 +3366,17 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys gettext_noop("Size")); appendPQExpBuffer(&buf, - ",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"", + ",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"", gettext_noop("Description")); } appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_class c" - "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace"); + "\n LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace"); if (showIndexes) appendPQExpBufferStr(&buf, - "\n LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid" - "\n LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid"); + "\n LEFT JOIN pg_catalog.pg_index i ON i.indexrelid = c.oid" + "\n LEFT JOIN pg_catalog.pg_class c2 ON i.indrelid = c2.oid"); appendPQExpBufferStr(&buf, "\nWHERE c.relkind IN ("); if (showTables) @@ -3464,7 +3464,7 @@ listLanguages(const char *pattern, bool verbose, bool showSystem) gettext_noop("Name")); if (pset.sversion >= 80300) appendPQExpBuffer(&buf, - " pg_catalog.pg_get_userbyid(l.lanowner) as \"%s\",\n", + " pg_catalog.pg_get_userbyid(l.lanowner) as \"%s\",\n", gettext_noop("Owner")); appendPQExpBuffer(&buf, @@ -3476,7 +3476,7 @@ listLanguages(const char *pattern, bool verbose, bool showSystem) appendPQExpBuffer(&buf, ",\n NOT l.lanispl AS \"%s\",\n" " l.lanplcallfoid::regprocedure AS \"%s\",\n" - " l.lanvalidator::regprocedure AS \"%s\",\n ", + " l.lanvalidator::regprocedure AS \"%s\",\n ", gettext_noop("Internal language"), gettext_noop("Call handler"), gettext_noop("Validator")); @@ -3537,7 +3537,7 @@ listDomains(const char *pattern, bool verbose, bool showSystem) printfPQExpBuffer(&buf, "SELECT n.nspname as \"%s\",\n" " t.typname as \"%s\",\n" - " pg_catalog.format_type(t.typbasetype, t.typtypmod) as \"%s\",\n", + " pg_catalog.format_type(t.typbasetype, t.typtypmod) as \"%s\",\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Type")); @@ -3548,7 +3548,7 @@ listDomains(const char *pattern, bool verbose, bool showSystem) " WHERE c.oid = t.typcollation AND bt.oid = t.typbasetype AND t.typcollation <> bt.typcollation) as \"%s\",\n", gettext_noop("Collation")); appendPQExpBuffer(&buf, - " CASE WHEN t.typnotnull THEN 'not null' END as \"%s\",\n" + " CASE WHEN t.typnotnull THEN 'not null' END as \"%s\",\n" " t.typdefault as \"%s\",\n" " pg_catalog.array_to_string(ARRAY(\n" " SELECT pg_catalog.pg_get_constraintdef(r.oid, true) FROM pg_catalog.pg_constraint r WHERE t.oid = r.contypid\n" @@ -3571,12 +3571,12 @@ listDomains(const char *pattern, bool verbose, bool showSystem) appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_type t\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n"); + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n"); if (verbose) appendPQExpBufferStr(&buf, " LEFT JOIN pg_catalog.pg_description d " - "ON d.classoid = t.tableoid AND d.objoid = t.oid " + "ON d.classoid = t.tableoid AND d.objoid = t.oid " "AND d.objsubid = 0\n"); appendPQExpBufferStr(&buf, "WHERE t.typtype = 'd'\n"); @@ -3625,8 +3625,8 @@ listConversions(const char *pattern, bool verbose, bool showSystem) printfPQExpBuffer(&buf, "SELECT n.nspname AS \"%s\",\n" " c.conname AS \"%s\",\n" - " pg_catalog.pg_encoding_to_char(c.conforencoding) AS \"%s\",\n" - " pg_catalog.pg_encoding_to_char(c.contoencoding) AS \"%s\",\n" + " pg_catalog.pg_encoding_to_char(c.conforencoding) AS \"%s\",\n" + " pg_catalog.pg_encoding_to_char(c.contoencoding) AS \"%s\",\n" " CASE WHEN c.condefault THEN '%s'\n" " ELSE '%s' END AS \"%s\"", gettext_noop("Schema"), @@ -3708,7 +3708,7 @@ listEventTriggers(const char *pattern, bool verbose) " when 'D' then '%s' end as \"%s\",\n" " e.evtfoid::pg_catalog.regproc as \"%s\", " "pg_catalog.array_to_string(array(select x" - " from pg_catalog.unnest(evttags) as t(x)), ', ') as \"%s\"", + " from pg_catalog.unnest(evttags) as t(x)), ', ') as \"%s\"", gettext_noop("Name"), gettext_noop("Event"), gettext_noop("Owner"), @@ -3721,7 +3721,7 @@ listEventTriggers(const char *pattern, bool verbose) gettext_noop("Tags")); if (verbose) appendPQExpBuffer(&buf, - ",\npg_catalog.obj_description(e.oid, 'pg_event_trigger') as \"%s\"", + ",\npg_catalog.obj_description(e.oid, 'pg_event_trigger') as \"%s\"", gettext_noop("Description")); appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_event_trigger e "); @@ -3770,9 +3770,9 @@ listCasts(const char *pattern, bool verbose) * function name that happens to match some string in the PO database. */ printfPQExpBuffer(&buf, - "SELECT pg_catalog.format_type(castsource, NULL) AS \"%s\",\n" - " pg_catalog.format_type(casttarget, NULL) AS \"%s\",\n" - " CASE WHEN castfunc = 0 THEN '(binary coercible)'\n" + "SELECT pg_catalog.format_type(castsource, NULL) AS \"%s\",\n" + " pg_catalog.format_type(casttarget, NULL) AS \"%s\",\n" + " CASE WHEN castfunc = 0 THEN '(binary coercible)'\n" " ELSE p.proname\n" " END as \"%s\",\n" " CASE WHEN c.castcontext = 'e' THEN '%s'\n" @@ -3793,7 +3793,7 @@ listCasts(const char *pattern, bool verbose) gettext_noop("Description")); appendPQExpBufferStr(&buf, - "FROM pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p\n" + "FROM pg_catalog.pg_cast c LEFT JOIN pg_catalog.pg_proc p\n" " ON c.castfunc = p.oid\n" " LEFT JOIN pg_catalog.pg_type ts\n" " ON c.castsource = ts.oid\n" @@ -3893,7 +3893,7 @@ listCollations(const char *pattern, bool verbose, bool showSystem) gettext_noop("Description")); appendPQExpBufferStr(&buf, - "\nFROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n\n" + "\nFROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n\n" "WHERE n.oid = c.collnamespace\n"); if (!showSystem && !pattern) @@ -3955,7 +3955,7 @@ listSchemas(const char *pattern, bool verbose, bool showSystem) appendPQExpBufferStr(&buf, ",\n "); printACLColumn(&buf, "n.nspacl"); appendPQExpBuffer(&buf, - ",\n pg_catalog.obj_description(n.oid, 'pg_namespace') AS \"%s\"", + ",\n pg_catalog.obj_description(n.oid, 'pg_namespace') AS \"%s\"", gettext_noop("Description")); } @@ -3964,7 +3964,7 @@ listSchemas(const char *pattern, bool verbose, bool showSystem) if (!showSystem && !pattern) appendPQExpBufferStr(&buf, - "WHERE n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'\n"); + "WHERE n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'\n"); processSQLNamePattern(pset.db, &buf, pattern, !showSystem && !pattern, false, @@ -4019,9 +4019,9 @@ listTSParsers(const char *pattern, bool verbose) "SELECT\n" " n.nspname as \"%s\",\n" " p.prsname as \"%s\",\n" - " pg_catalog.obj_description(p.oid, 'pg_ts_parser') as \"%s\"\n" + " pg_catalog.obj_description(p.oid, 'pg_ts_parser') as \"%s\"\n" "FROM pg_catalog.pg_ts_parser p\n" - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.prsnamespace\n", + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.prsnamespace\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Description") @@ -4065,7 +4065,7 @@ listTSParsersVerbose(const char *pattern) " n.nspname,\n" " p.prsname\n" "FROM pg_catalog.pg_ts_parser p\n" - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.prsnamespace\n" + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.prsnamespace\n" ); processSQLNamePattern(pset.db, &buf, pattern, false, false, @@ -4130,7 +4130,7 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname) printfPQExpBuffer(&buf, "SELECT '%s' AS \"%s\",\n" " p.prsstart::pg_catalog.regproc AS \"%s\",\n" - " pg_catalog.obj_description(p.prsstart, 'pg_proc') as \"%s\"\n" + " pg_catalog.obj_description(p.prsstart, 'pg_proc') as \"%s\"\n" " FROM pg_catalog.pg_ts_parser p\n" " WHERE p.oid = '%s'\n" "UNION ALL\n" @@ -4148,13 +4148,13 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname) "UNION ALL\n" "SELECT '%s',\n" " p.prsheadline::pg_catalog.regproc,\n" - " pg_catalog.obj_description(p.prsheadline, 'pg_proc')\n" + " pg_catalog.obj_description(p.prsheadline, 'pg_proc')\n" " FROM pg_catalog.pg_ts_parser p\n" " WHERE p.oid = '%s'\n" "UNION ALL\n" "SELECT '%s',\n" " p.prslextype::pg_catalog.regproc,\n" - " pg_catalog.obj_description(p.prslextype, 'pg_proc')\n" + " pg_catalog.obj_description(p.prslextype, 'pg_proc')\n" " FROM pg_catalog.pg_ts_parser p\n" " WHERE p.oid = '%s';", gettext_noop("Start parse"), @@ -4197,7 +4197,7 @@ describeOneTSParser(const char *oid, const char *nspname, const char *prsname) printfPQExpBuffer(&buf, "SELECT t.alias as \"%s\",\n" " t.description as \"%s\"\n" - "FROM pg_catalog.ts_token_type( '%s'::pg_catalog.oid ) as t\n" + "FROM pg_catalog.ts_token_type( '%s'::pg_catalog.oid ) as t\n" "ORDER BY 1;", gettext_noop("Token name"), gettext_noop("Description"), @@ -4270,11 +4270,11 @@ listTSDictionaries(const char *pattern, bool verbose) } appendPQExpBuffer(&buf, - " pg_catalog.obj_description(d.oid, 'pg_ts_dict') as \"%s\"\n", + " pg_catalog.obj_description(d.oid, 'pg_ts_dict') as \"%s\"\n", gettext_noop("Description")); appendPQExpBufferStr(&buf, "FROM pg_catalog.pg_ts_dict d\n" - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace\n"); + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.dictnamespace\n"); processSQLNamePattern(pset.db, &buf, pattern, false, false, "n.nspname", "d.dictname", NULL, @@ -4328,7 +4328,7 @@ listTSTemplates(const char *pattern, bool verbose) " t.tmplname AS \"%s\",\n" " t.tmplinit::pg_catalog.regproc AS \"%s\",\n" " t.tmpllexize::pg_catalog.regproc AS \"%s\",\n" - " pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n", + " pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Init"), @@ -4339,13 +4339,13 @@ listTSTemplates(const char *pattern, bool verbose) "SELECT\n" " n.nspname AS \"%s\",\n" " t.tmplname AS \"%s\",\n" - " pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n", + " pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Description")); appendPQExpBufferStr(&buf, "FROM pg_catalog.pg_ts_template t\n" - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.tmplnamespace\n"); + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.tmplnamespace\n"); processSQLNamePattern(pset.db, &buf, pattern, false, false, "n.nspname", "t.tmplname", NULL, @@ -4399,9 +4399,9 @@ listTSConfigs(const char *pattern, bool verbose) "SELECT\n" " n.nspname as \"%s\",\n" " c.cfgname as \"%s\",\n" - " pg_catalog.obj_description(c.oid, 'pg_ts_config') as \"%s\"\n" + " pg_catalog.obj_description(c.oid, 'pg_ts_config') as \"%s\"\n" "FROM pg_catalog.pg_ts_config c\n" - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace\n", + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace\n", gettext_noop("Schema"), gettext_noop("Name"), gettext_noop("Description") @@ -4443,9 +4443,9 @@ listTSConfigsVerbose(const char *pattern) " p.prsname,\n" " np.nspname as pnspname\n" "FROM pg_catalog.pg_ts_config c\n" - " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace,\n" + " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.cfgnamespace,\n" " pg_catalog.pg_ts_parser p\n" - " LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.prsnamespace\n" + " LEFT JOIN pg_catalog.pg_namespace np ON np.oid = p.prsnamespace\n" "WHERE p.oid = c.cfgparser\n" ); @@ -4519,13 +4519,13 @@ describeOneTSConfig(const char *oid, const char *nspname, const char *cfgname, " pg_catalog.ts_token_type(c.cfgparser) AS t\n" " WHERE t.tokid = m.maptokentype ) AS \"%s\",\n" " pg_catalog.btrim(\n" - " ARRAY( SELECT mm.mapdict::pg_catalog.regdictionary\n" + " ARRAY( SELECT mm.mapdict::pg_catalog.regdictionary\n" " FROM pg_catalog.pg_ts_config_map AS mm\n" " WHERE mm.mapcfg = m.mapcfg AND mm.maptokentype = m.maptokentype\n" " ORDER BY mapcfg, maptokentype, mapseqno\n" " ) :: pg_catalog.text,\n" " '{}') AS \"%s\"\n" - "FROM pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m\n" + "FROM pg_catalog.pg_ts_config AS c, pg_catalog.pg_ts_config_map AS m\n" "WHERE c.oid = '%s' AND m.mapcfg = c.oid\n" "GROUP BY m.mapcfg, m.maptokentype, c.cfgparser\n" "ORDER BY 1;", @@ -4594,7 +4594,7 @@ listForeignDataWrappers(const char *pattern, bool verbose) initPQExpBuffer(&buf); printfPQExpBuffer(&buf, "SELECT fdw.fdwname AS \"%s\",\n" - " pg_catalog.pg_get_userbyid(fdw.fdwowner) AS \"%s\",\n", + " pg_catalog.pg_get_userbyid(fdw.fdwowner) AS \"%s\",\n", gettext_noop("Name"), gettext_noop("Owner")); if (pset.sversion >= 90100) @@ -4706,12 +4706,12 @@ listForeignServers(const char *pattern, bool verbose) appendPQExpBufferStr(&buf, "\nFROM pg_catalog.pg_foreign_server s\n" - " JOIN pg_catalog.pg_foreign_data_wrapper f ON f.oid=s.srvfdw\n"); + " JOIN pg_catalog.pg_foreign_data_wrapper f ON f.oid=s.srvfdw\n"); if (verbose) appendPQExpBufferStr(&buf, "LEFT JOIN pg_description d\n " - "ON d.classoid = s.tableoid AND d.objoid = s.oid " + "ON d.classoid = s.tableoid AND d.objoid = s.oid " "AND d.objsubid = 0\n"); processSQLNamePattern(pset.db, &buf, pattern, false, false, @@ -4898,11 +4898,11 @@ listExtensions(const char *pattern) initPQExpBuffer(&buf); printfPQExpBuffer(&buf, "SELECT e.extname AS \"%s\", " - "e.extversion AS \"%s\", n.nspname AS \"%s\", c.description AS \"%s\"\n" + "e.extversion AS \"%s\", n.nspname AS \"%s\", c.description AS \"%s\"\n" "FROM pg_catalog.pg_extension e " - "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace " - "LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid " - "AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\n", + "LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace " + "LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid " + "AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\n", gettext_noop("Name"), gettext_noop("Version"), gettext_noop("Schema"), @@ -5017,7 +5017,7 @@ listOneExtensionContents(const char *extname, const char *oid) initPQExpBuffer(&buf); printfPQExpBuffer(&buf, - "SELECT pg_catalog.pg_describe_object(classid, objid, 0) AS \"%s\"\n" + "SELECT pg_catalog.pg_describe_object(classid, objid, 0) AS \"%s\"\n" "FROM pg_catalog.pg_depend\n" "WHERE refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass AND refobjid = '%s' AND deptype = 'e'\n" "ORDER BY 1;", @@ -5277,7 +5277,7 @@ describeSubscriptions(const char *pattern, bool verbose) "FROM pg_catalog.pg_subscription\n" "WHERE subdbid = (SELECT oid\n" " FROM pg_catalog.pg_database\n" - " WHERE datname = current_database())"); + " WHERE datname = current_database())"); processSQLNamePattern(pset.db, &buf, pattern, true, false, NULL, "subname", NULL, diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index f6acf871971..8e08da79e9d 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -84,8 +84,8 @@ usage(unsigned short int pager) fprintf(output, _(" -f, --file=FILENAME execute commands from file, then exit\n")); fprintf(output, _(" -l, --list list available databases, then exit\n")); fprintf(output, _(" -v, --set=, --variable=NAME=VALUE\n" - " set psql variable NAME to VALUE\n" - " (e.g., -v ON_ERROR_STOP=1)\n")); + " set psql variable NAME to VALUE\n" + " (e.g., -v ON_ERROR_STOP=1)\n")); fprintf(output, _(" -V, --version output version information, then exit\n")); fprintf(output, _(" -X, --no-psqlrc do not read startup file (~/.psqlrc)\n")); fprintf(output, _(" -1 (\"one\"), --single-transaction\n" @@ -278,7 +278,7 @@ slashUsage(unsigned short int pager) ON(pset.popt.topt.tuples_only)); fprintf(output, _(" \\T [STRING] set HTML <table> tag attributes, or unset if none\n")); fprintf(output, _(" \\x [on|off|auto] toggle expanded output (currently %s)\n"), - pset.popt.topt.expanded == 2 ? "auto" : ON(pset.popt.topt.expanded)); + pset.popt.topt.expanded == 2 ? "auto" : ON(pset.popt.topt.expanded)); fprintf(output, "\n"); fprintf(output, _("Connection\n")); @@ -344,7 +344,7 @@ helpVariables(unsigned short int pager) fprintf(output, _(" AUTOCOMMIT if set, successful SQL commands are automatically committed\n")); fprintf(output, _(" COMP_KEYWORD_CASE determines the case used to complete SQL key words\n" - " [lower, upper, preserve-lower, preserve-upper]\n")); + " [lower, upper, preserve-lower, preserve-upper]\n")); fprintf(output, _(" DBNAME the currently connected database name\n")); fprintf(output, _(" ECHO controls what input is written to standard output\n" " [all, errors, none, queries]\n")); @@ -583,19 +583,19 @@ print_copyright(void) "(formerly known as Postgres, then as Postgres95)\n\n" "Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group\n\n" "Portions Copyright (c) 1994, The Regents of the University of California\n\n" - "Permission to use, copy, modify, and distribute this software and its\n" + "Permission to use, copy, modify, and distribute this software and its\n" "documentation for any purpose, without fee, and without a written agreement\n" - "is hereby granted, provided that the above copyright notice and this\n" - "paragraph and the following two paragraphs appear in all copies.\n\n" + "is hereby granted, provided that the above copyright notice and this\n" + "paragraph and the following two paragraphs appear in all copies.\n\n" "IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR\n" "DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING\n" "LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS\n" "DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE\n" "POSSIBILITY OF SUCH DAMAGE.\n\n" - "THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,\n" + "THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,\n" "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\n" "AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS\n" "ON AN \"AS IS\" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO\n" - "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n" + "PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n" ); } diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c index 2ad0a4bb835..2a3416b3698 100644 --- a/src/bin/psql/large_obj.c +++ b/src/bin/psql/large_obj.c @@ -281,7 +281,7 @@ do_lo_list(void) snprintf(buf, sizeof(buf), "SELECT oid as \"%s\",\n" " pg_catalog.pg_get_userbyid(lomowner) as \"%s\",\n" - " pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n" + " pg_catalog.obj_description(oid, 'pg_largeobject') as \"%s\"\n" " FROM pg_catalog.pg_largeobject_metadata " " ORDER BY oid", gettext_noop("ID"), @@ -292,8 +292,8 @@ do_lo_list(void) { snprintf(buf, sizeof(buf), "SELECT loid as \"%s\",\n" - " pg_catalog.obj_description(loid, 'pg_largeobject') as \"%s\"\n" - "FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x\n" + " pg_catalog.obj_description(loid, 'pg_largeobject') as \"%s\"\n" + "FROM (SELECT DISTINCT loid FROM pg_catalog.pg_largeobject) x\n" "ORDER BY 1", gettext_noop("ID"), gettext_noop("Description")); diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index e35b9077649..0162ee8d2f5 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -226,7 +226,7 @@ MainLoop(FILE *source) printf(_("Type: \\copyright for distribution terms\n" " \\h for help with SQL commands\n" " \\? for help with psql commands\n" - " \\g or terminate with semicolon to execute query\n" + " \\g or terminate with semicolon to execute query\n" " \\q to quit\n")); fflush(stdout); diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 20c41b7ce51..29ccc257932 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1078,7 +1078,7 @@ static void append_variable_names(char ***varnames, int *nvars, int *maxvars, const char *varname, const char *prefix, const char *suffix); static char **complete_from_variables(const char *text, - const char *prefix, const char *suffix, bool need_value); + const char *prefix, const char *suffix, bool need_value); static char *complete_from_files(const char *text, int state); static char *pg_strdup_keyword_case(const char *s, const char *ref); @@ -1974,11 +1974,11 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_LIST5("(", "DEFAULT", "NOT NULL", "STATISTICS", "STORAGE"); /* ALTER TABLE ALTER [COLUMN] <foo> SET ( */ else if (Matches8("ALTER", "TABLE", MatchAny, "ALTER", "COLUMN", MatchAny, "SET", "(") || - Matches7("ALTER", "TABLE", MatchAny, "ALTER", MatchAny, "SET", "(")) + Matches7("ALTER", "TABLE", MatchAny, "ALTER", MatchAny, "SET", "(")) COMPLETE_WITH_LIST2("n_distinct", "n_distinct_inherited"); /* ALTER TABLE ALTER [COLUMN] <foo> SET STORAGE */ else if (Matches8("ALTER", "TABLE", MatchAny, "ALTER", "COLUMN", MatchAny, "SET", "STORAGE") || - Matches7("ALTER", "TABLE", MatchAny, "ALTER", MatchAny, "SET", "STORAGE")) + Matches7("ALTER", "TABLE", MatchAny, "ALTER", MatchAny, "SET", "STORAGE")) COMPLETE_WITH_LIST4("PLAIN", "EXTERNAL", "EXTENDED", "MAIN"); /* ALTER TABLE ALTER [COLUMN] <foo> DROP */ else if (Matches7("ALTER", "TABLE", MatchAny, "ALTER", "COLUMN", MatchAny, "DROP") || @@ -2218,7 +2218,7 @@ psql_completion(const char *text, int start, int end) else if (Matches4("COMMENT", "ON", "EVENT", "TRIGGER")) COMPLETE_WITH_QUERY(Query_for_list_of_event_triggers); else if (Matches4("COMMENT", "ON", MatchAny, MatchAnyExcept("IS")) || - Matches5("COMMENT", "ON", MatchAny, MatchAny, MatchAnyExcept("IS")) || + Matches5("COMMENT", "ON", MatchAny, MatchAny, MatchAnyExcept("IS")) || Matches6("COMMENT", "ON", MatchAny, MatchAny, MatchAny, MatchAnyExcept("IS"))) COMPLETE_WITH_CONST("IS"); @@ -2474,7 +2474,7 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_LIST8("INCREMENT BY", "MINVALUE", "MAXVALUE", "NO", "CACHE", "CYCLE", "OWNED BY", "START WITH"); else if (TailMatches4("CREATE", "SEQUENCE", MatchAny, "NO") || - TailMatches5("CREATE", "TEMP|TEMPORARY", "SEQUENCE", MatchAny, "NO")) + TailMatches5("CREATE", "TEMP|TEMPORARY", "SEQUENCE", MatchAny, "NO")) COMPLETE_WITH_LIST3("MINVALUE", "MAXVALUE", "CYCLE"); /* CREATE SERVER <name> */ @@ -2553,7 +2553,7 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_LIST3("INSERT", "DELETE", "UPDATE"); /* complete CREATE TRIGGER <name> BEFORE,AFTER sth with OR,ON */ else if (TailMatches5("CREATE", "TRIGGER", MatchAny, "BEFORE|AFTER", MatchAny) || - TailMatches6("CREATE", "TRIGGER", MatchAny, "INSTEAD", "OF", MatchAny)) + TailMatches6("CREATE", "TRIGGER", MatchAny, "INSTEAD", "OF", MatchAny)) COMPLETE_WITH_LIST2("ON", "OR"); /* @@ -2567,7 +2567,7 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL); else if (HeadMatches2("CREATE", "TRIGGER") && TailMatches2("ON", MatchAny)) COMPLETE_WITH_LIST7("NOT DEFERRABLE", "DEFERRABLE", "INITIALLY", - "REFERENCING", "FOR", "WHEN (", "EXECUTE PROCEDURE"); + "REFERENCING", "FOR", "WHEN (", "EXECUTE PROCEDURE"); else if (HeadMatches2("CREATE", "TRIGGER") && (TailMatches1("DEFERRABLE") || TailMatches2("INITIALLY", "IMMEDIATE|DEFERRED"))) COMPLETE_WITH_LIST4("REFERENCING", "FOR", "WHEN (", "EXECUTE PROCEDURE"); @@ -2859,7 +2859,7 @@ psql_completion(const char *text, int start, int end) */ if (HeadMatches3("ALTER", "DEFAULT", "PRIVILEGES")) COMPLETE_WITH_LIST10("SELECT", "INSERT", "UPDATE", - "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", + "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "EXECUTE", "USAGE", "ALL"); else COMPLETE_WITH_QUERY(Query_for_list_of_roles @@ -2913,8 +2913,8 @@ psql_completion(const char *text, int start, int end) COMPLETE_WITH_LIST5("TABLES", "SEQUENCES", "FUNCTIONS", "TYPES", "SCHEMAS"); else COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsvmf, - " UNION SELECT 'ALL FUNCTIONS IN SCHEMA'" - " UNION SELECT 'ALL SEQUENCES IN SCHEMA'" + " UNION SELECT 'ALL FUNCTIONS IN SCHEMA'" + " UNION SELECT 'ALL SEQUENCES IN SCHEMA'" " UNION SELECT 'ALL TABLES IN SCHEMA'" " UNION SELECT 'DATABASE'" " UNION SELECT 'DOMAIN'" @@ -3203,11 +3203,11 @@ psql_completion(const char *text, int start, int end) else if (Matches2("BEGIN|START", "TRANSACTION") || Matches2("BEGIN", "WORK") || Matches1("BEGIN") || - Matches5("SET", "SESSION", "CHARACTERISTICS", "AS", "TRANSACTION")) + Matches5("SET", "SESSION", "CHARACTERISTICS", "AS", "TRANSACTION")) COMPLETE_WITH_LIST4("ISOLATION LEVEL", "READ", "DEFERRABLE", "NOT DEFERRABLE"); else if (Matches3("SET|BEGIN|START", "TRANSACTION|WORK", "NOT") || Matches2("BEGIN", "NOT") || - Matches6("SET", "SESSION", "CHARACTERISTICS", "AS", "TRANSACTION", "NOT")) + Matches6("SET", "SESSION", "CHARACTERISTICS", "AS", "TRANSACTION", "NOT")) COMPLETE_WITH_CONST("DEFERRABLE"); else if (Matches3("SET|BEGIN|START", "TRANSACTION|WORK", "ISOLATION") || Matches2("BEGIN", "ISOLATION") || @@ -3836,7 +3836,7 @@ _complete_from_query(int is_schema_query, const char *text, int state) { appendPQExpBufferStr(&query_buffer, " AND c.relnamespace <> (SELECT oid FROM" - " pg_catalog.pg_namespace WHERE nspname = 'pg_catalog')"); + " pg_catalog.pg_namespace WHERE nspname = 'pg_catalog')"); } /* @@ -3844,14 +3844,14 @@ _complete_from_query(int is_schema_query, const char *text, int state) * one potential match among schema names. */ appendPQExpBuffer(&query_buffer, "\nUNION\n" - "SELECT pg_catalog.quote_ident(n.nspname) || '.' " + "SELECT pg_catalog.quote_ident(n.nspname) || '.' " "FROM pg_catalog.pg_namespace n " "WHERE substring(pg_catalog.quote_ident(n.nspname) || '.',1,%d)='%s'", char_length, e_text); appendPQExpBuffer(&query_buffer, " AND (SELECT pg_catalog.count(*)" " FROM pg_catalog.pg_namespace" - " WHERE substring(pg_catalog.quote_ident(nspname) || '.',1,%d) =" + " WHERE substring(pg_catalog.quote_ident(nspname) || '.',1,%d) =" " substring('%s',1,pg_catalog.length(pg_catalog.quote_ident(nspname))+1)) > 1", char_length, e_text); @@ -3860,7 +3860,7 @@ _complete_from_query(int is_schema_query, const char *text, int state) * one schema matching the input-so-far. */ appendPQExpBuffer(&query_buffer, "\nUNION\n" - "SELECT pg_catalog.quote_ident(n.nspname) || '.' || %s " + "SELECT pg_catalog.quote_ident(n.nspname) || '.' || %s " "FROM %s, pg_catalog.pg_namespace n " "WHERE %s = n.oid AND ", qualresult, @@ -3878,13 +3878,13 @@ _complete_from_query(int is_schema_query, const char *text, int state) * speed up the query */ appendPQExpBuffer(&query_buffer, - " AND substring(pg_catalog.quote_ident(n.nspname) || '.',1,%d) =" + " AND substring(pg_catalog.quote_ident(n.nspname) || '.',1,%d) =" " substring('%s',1,pg_catalog.length(pg_catalog.quote_ident(n.nspname))+1)", char_length, e_text); appendPQExpBuffer(&query_buffer, " AND (SELECT pg_catalog.count(*)" " FROM pg_catalog.pg_namespace" - " WHERE substring(pg_catalog.quote_ident(nspname) || '.',1,%d) =" + " WHERE substring(pg_catalog.quote_ident(nspname) || '.',1,%d) =" " substring('%s',1,pg_catalog.length(pg_catalog.quote_ident(nspname))+1)) = 1", char_length, e_text); @@ -4152,7 +4152,7 @@ pg_strdup_keyword_case(const char *s, const char *ref) if (pset.comp_case == PSQL_COMP_CASE_LOWER || ((pset.comp_case == PSQL_COMP_CASE_PRESERVE_LOWER || - pset.comp_case == PSQL_COMP_CASE_PRESERVE_UPPER) && islower(first)) || + pset.comp_case == PSQL_COMP_CASE_PRESERVE_UPPER) && islower(first)) || (pset.comp_case == PSQL_COMP_CASE_PRESERVE_LOWER && !isalpha(first))) { for (p = ret; *p; p++) diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h index 61a31a7f4d7..18d8d12d15a 100644 --- a/src/bin/scripts/common.h +++ b/src/bin/scripts/common.h @@ -35,8 +35,8 @@ extern PGconn *connectDatabase(const char *dbname, const char *pghost, bool fail_ok, bool allow_password_reuse); extern PGconn *connectMaintenanceDatabase(const char *maintenance_db, - const char *pghost, const char *pgport, const char *pguser, - enum trivalue prompt_password, const char *progname); + const char *pghost, const char *pgport, const char *pguser, + enum trivalue prompt_password, const char *progname); extern PGresult *executeQuery(PGconn *conn, const char *query, const char *progname, bool echo); diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c index 85c75a79ce1..5dc8558e8eb 100644 --- a/src/bin/scripts/dropdb.c +++ b/src/bin/scripts/dropdb.c @@ -129,7 +129,7 @@ main(int argc, char *argv[]) maintenance_db = "template1"; conn = connectMaintenanceDatabase(maintenance_db, - host, port, username, prompt_password, progname); + host, port, username, prompt_password, progname); if (echo) printf("%s\n", sql.data); diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index 12a4528574b..ffd611e7bb3 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -182,7 +182,7 @@ main(int argc, char *argv[]) } reindex_all_databases(maintenance_db, host, port, username, - prompt_password, progname, echo, quiet, verbose); + prompt_password, progname, echo, quiet, verbose); } else if (syscatalog) { @@ -234,7 +234,7 @@ main(int argc, char *argv[]) for (cell = schemas.head; cell; cell = cell->next) { reindex_one_database(cell->val, dbname, "SCHEMA", host, port, - username, prompt_password, progname, echo, verbose); + username, prompt_password, progname, echo, verbose); } } @@ -245,7 +245,7 @@ main(int argc, char *argv[]) for (cell = indexes.head; cell; cell = cell->next) { reindex_one_database(cell->val, dbname, "INDEX", host, port, - username, prompt_password, progname, echo, verbose); + username, prompt_password, progname, echo, verbose); } } if (tables.head != NULL) @@ -255,7 +255,7 @@ main(int argc, char *argv[]) for (cell = tables.head; cell; cell = cell->next) { reindex_one_database(cell->val, dbname, "TABLE", host, port, - username, prompt_password, progname, echo, verbose); + username, prompt_password, progname, echo, verbose); } } @@ -265,7 +265,7 @@ main(int argc, char *argv[]) */ if (indexes.head == NULL && tables.head == NULL && schemas.head == NULL) reindex_one_database(NULL, dbname, "DATABASE", host, port, - username, prompt_password, progname, echo, verbose); + username, prompt_password, progname, echo, verbose); } exit(0); @@ -274,7 +274,7 @@ main(int argc, char *argv[]) static void reindex_one_database(const char *name, const char *dbname, const char *type, const char *host, const char *port, const char *username, - enum trivalue prompt_password, const char *progname, bool echo, + enum trivalue prompt_password, const char *progname, bool echo, bool verbose) { PQExpBufferData sql; @@ -327,7 +327,7 @@ static void reindex_all_databases(const char *maintenance_db, const char *host, const char *port, const char *username, enum trivalue prompt_password, - const char *progname, bool echo, bool quiet, bool verbose) + const char *progname, bool echo, bool quiet, bool verbose) { PGconn *conn; PGresult *result; diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 97792d0720e..5d2869ea6bd 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -557,7 +557,7 @@ vacuum_all_databases(vacuumingOptions *vacopts, conn = connectMaintenanceDatabase(maintenance_db, host, port, username, prompt_password, progname); result = executeQuery(conn, - "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", + "SELECT datname FROM pg_database WHERE datallowconn ORDER BY 1;", progname, echo); PQfinish(conn); @@ -705,7 +705,7 @@ run_vacuum_command(PGconn *conn, const char *sql, bool echo, { if (table) fprintf(stderr, - _("%s: vacuuming of table \"%s\" in database \"%s\" failed: %s"), + _("%s: vacuuming of table \"%s\" in database \"%s\" failed: %s"), progname, table, PQdb(conn), PQerrorMessage(conn)); else fprintf(stderr, _("%s: vacuuming of database \"%s\" failed: %s"), |