diff options
Diffstat (limited to 'src/bin/pg_dump')
-rw-r--r-- | src/bin/pg_dump/common.c | 4 | ||||
-rw-r--r-- | src/bin/pg_dump/dumputils.c | 12 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 16 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_db.c | 4 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 42 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump.h | 6 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dump_sort.c | 16 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 6 |
8 files changed, 53 insertions, 53 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index e159bc4478..5ffad38ddc 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -40,7 +40,7 @@ static int numCatalogIds = 0; /* * These variables are static to avoid the notational cruft of having to pass - * them into findTableByOid() and friends. For each of these arrays, we + * them into findTableByOid() and friends. For each of these arrays, we * build a sorted-by-OID index array immediately after it's built, and then * we use binary search in findTableByOid() and friends. (qsort'ing the base * arrays themselves would be simpler, but it doesn't work because pg_dump.c @@ -467,7 +467,7 @@ findObjectByDumpId(DumpId dumpId) * * We use binary search in a sorted list that is built on first call. * If AssignDumpId() and findObjectByCatalogId() calls were intermixed, - * the code would work, but possibly be very slow. In the current usage + * the code would work, but possibly be very slow. In the current usage * pattern that does not happen, indeed we only need to build the list once. */ DumpableObject * diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index 345d6cf3c8..1fe7036ede 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -168,7 +168,7 @@ fmtId(const char *rawid) * standard_conforming_strings settings. * * This is essentially equivalent to libpq's PQescapeStringInternal, - * except for the output buffer structure. We need it in situations + * except for the output buffer structure. We need it in situations * where we do not have a PGconn available. Where we do, * appendStringLiteralConn is a better choice. */ @@ -429,7 +429,7 @@ parse_version(const char *versionString) * into individual items. * * On success, returns true and sets *itemarray and *nitems to describe - * an array of individual strings. On parse failure, returns false; + * an array of individual strings. On parse failure, returns false; * *itemarray may exist or be NULL. * * NOTE: free'ing itemarray is sufficient to deallocate the working storage. @@ -564,7 +564,7 @@ buildACLCommands(const char *name, const char *subname, /* * At the end, these two will be pasted together to form the result. But * the owner privileges need to go before the other ones to keep the - * dependencies valid. In recent versions this is normally the case, but + * dependencies valid. In recent versions this is normally the case, but * in old versions they come after the PUBLIC privileges and that results * in problems if we need to run REVOKE on the owner privileges. */ @@ -718,7 +718,7 @@ buildACLCommands(const char *name, const char *subname, * * The returned grantee string will be the dequoted username or groupname * (preceded with "group " in the latter case). The returned grantor is - * the dequoted grantor name or empty. Privilege characters are decoded + * the dequoted grantor name or empty. Privilege characters are decoded * and split between privileges with grant option (privswgo) and without * (privs). * @@ -935,7 +935,7 @@ AddAcl(PQExpBuffer aclbuf, const char *keyword, const char *subname) * namevar: name of query variable to match against an object-name pattern. * altnamevar: NULL, or name of an alternative variable to match against name. * visibilityrule: clause to use if we want to restrict to visible objects - * (for example, "pg_catalog.pg_table_is_visible(p.oid)"). Can be NULL. + * (for example, "pg_catalog.pg_table_is_visible(p.oid)"). Can be NULL. * * Formatting note: the text already present in buf should end with a newline. * The appended text, if any, will end with one too. @@ -980,7 +980,7 @@ processSQLNamePattern(PGconn *conn, PQExpBuffer buf, const char *pattern, * last alternatives which is not what we want. * * Note: the result of this pass is the actual regexp pattern(s) we want - * to execute. Quoting/escaping into SQL literal format will be done + * to execute. Quoting/escaping into SQL literal format will be done * below using appendStringLiteralConn(). */ appendPQExpBufferStr(&namebuf, "^("); diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 4914e2e9cf..fe930739af 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -563,8 +563,8 @@ restore_toc_entry(ArchiveHandle *AH, TocEntry *te, /* * In parallel restore, if we created the table earlier in * the run then we wrap the COPY in a transaction and - * precede it with a TRUNCATE. If archiving is not on - * this prevents WAL-logging the COPY. This obtains a + * precede it with a TRUNCATE. If archiving is not on + * this prevents WAL-logging the COPY. This obtains a * speedup similar to that from using single_txn mode in * non-parallel restores. */ @@ -2413,7 +2413,7 @@ _doSetSessionAuth(ArchiveHandle *AH, const char *user) appendPQExpBuffer(cmd, "SET SESSION AUTHORIZATION "); /* - * SQL requires a string literal here. Might as well be correct. + * SQL requires a string literal here. Might as well be correct. */ if (user && *user) appendStringLiteralAHX(cmd, user, AH); @@ -2544,7 +2544,7 @@ _becomeUser(ArchiveHandle *AH, const char *user) } /* - * Become the owner of the the given TOC entry object. If + * Become the owner of the the given TOC entry object. If * changes in ownership are not allowed, this doesn't do anything. */ static void @@ -3233,7 +3233,7 @@ restore_toc_entries_parallel(ArchiveHandle *AH) } /* - * Now close parent connection in prep for parallel steps. We do this + * Now close parent connection in prep for parallel steps. We do this * mainly to ensure that we don't exceed the specified number of parallel * connections. */ @@ -3733,7 +3733,7 @@ fix_dependencies(ArchiveHandle *AH) /* * For some of the steps here, it is convenient to have an array that * indexes the TOC entries by dump ID, rather than searching the TOC list - * repeatedly. Entries for dump IDs not present in the TOC will be NULL. + * repeatedly. Entries for dump IDs not present in the TOC will be NULL. * * NOTE: because maxDumpId is just the highest dump ID defined in the * archive, there might be dependencies for IDs > maxDumpId. All uses @@ -3759,7 +3759,7 @@ fix_dependencies(ArchiveHandle *AH) * Note: currently, a TABLE DATA should always have exactly one * dependency, on its TABLE item. So we don't bother to search, but look * just at the first dependency. We do trouble to make sure that it's a - * TABLE, if possible. However, if the dependency isn't in the archive + * TABLE, if possible. However, if the dependency isn't in the archive * then just assume it was a TABLE; this is to cover cases where the table * was suppressed but we have the data and some dependent post-data items. */ @@ -3809,7 +3809,7 @@ fix_dependencies(ArchiveHandle *AH) /* * It is possible that the dependencies list items that are not in the - * archive at all. Subtract such items from the depCounts. + * archive at all. Subtract such items from the depCounts. */ for (te = AH->toc->next; te != AH->toc; te = te->next) { diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c index 3bfcaf8db0..236f7e2e96 100644 --- a/src/bin/pg_dump/pg_backup_db.c +++ b/src/bin/pg_dump/pg_backup_db.c @@ -71,7 +71,7 @@ _check_database_version(ArchiveHandle *AH) /* * Reconnect to the server. If dbname is not NULL, use that database, * else the one associated with the archive handle. If username is - * not NULL, use that user name, else the one from the handle. If + * not NULL, use that user name, else the one from the handle. If * both the database and the user match the existing connection already, * nothing will be done. * @@ -112,7 +112,7 @@ ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *username) * * Note: it's not really all that sensible to use a single-entry password * cache if the username keeps changing. In current usage, however, the - * username never does change, so one savedPassword is sufficient. We do + * username never does change, so one savedPassword is sufficient. We do * update the cache on the off chance that the password has changed since the * start of the run. */ diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index b1c4f8d12e..77ba04b435 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -1007,7 +1007,7 @@ selectDumpableTable(TableInfo *tbinfo) * Mark a type as to be dumped or not * * If it's a table's rowtype or an autogenerated array type, we also apply a - * special type code to facilitate sorting into the desired order. (We don't + * special type code to facilitate sorting into the desired order. (We don't * want to consider those to be ordinary types because that would bring tables * up into the datatype part of the dump order.) We still set the object's * dump flag; that's not going to cause the dummy type to be dumped, but we @@ -1315,7 +1315,7 @@ dumpTableData_insert(Archive *fout, void *dcontext) /* * These types are printed without quotes unless * they contain values that aren't accepted by the - * scanner unquoted (e.g., 'NaN'). Note that + * scanner unquoted (e.g., 'NaN'). Note that * strtod() and friends might accept NaN, so we * can't use that to test. * @@ -1510,7 +1510,7 @@ getTableDataFKConstraints(void) /* * guessConstraintInheritance: * In pre-8.4 databases, we can't tell for certain which constraints - * are inherited. We assume a CHECK constraint is inherited if its name + * are inherited. We assume a CHECK constraint is inherited if its name * matches the name of any constraint in the parent. Originally this code * tried to compare the expression texts, but that can fail for various * reasons --- for example, if the parent and child tables are in different @@ -2244,7 +2244,7 @@ getNamespaces(int *numNamespaces) * getNamespaces * * NB: for pre-7.3 source database, we use object OID to guess whether it's - * a system object or not. In 7.3 and later there is no guessing, and we + * a system object or not. In 7.3 and later there is no guessing, and we * don't use objoid at all. */ static NamespaceInfo * @@ -2322,7 +2322,7 @@ getTypes(int *numTypes) * auto-generated array type by checking the element type's typarray. * (Before that the test is capable of generating false positives.) We * still check for name beginning with '_', though, so as to avoid the - * cost of the subselect probe for all standard types. This would have to + * cost of the subselect probe for all standard types. This would have to * be revisited if the backend ever allows renaming of array types. */ @@ -2449,7 +2449,7 @@ getTypes(int *numTypes) /* * If it's a base type, make a DumpableObject representing a shell - * definition of the type. We will need to dump that ahead of the I/O + * definition of the type. We will need to dump that ahead of the I/O * functions for the type. * * Note: the shell type doesn't have a catId. You might think it @@ -3892,7 +3892,7 @@ getIndexes(TableInfo tblinfo[], int numTables) /* * In pre-7.4 releases, indkeys may contain more entries than * indnkeys says (since indnkeys will be 1 for a functional - * index). We don't actually care about this case since we don't + * index). We don't actually care about this case since we don't * examine indkeys except for indexes associated with PRIMARY and * UNIQUE constraints, which are never functional indexes. But we * have to allocate enough space to keep parseOidArray from @@ -4983,7 +4983,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) /* * Defaults on a VIEW must always be dumped as separate ALTER - * TABLE commands. Defaults on regular tables are dumped as + * TABLE commands. Defaults on regular tables are dumped as * part of the CREATE TABLE if possible, which it won't be * if the column is not going to be emitted explicitly. */ @@ -5150,7 +5150,7 @@ getTableAttrs(TableInfo *tblinfo, int numTables) /* * If the constraint is inherited, this will be detected later - * (in pre-8.4 databases). We also detect later if the + * (in pre-8.4 databases). We also detect later if the * constraint must be split out from the table definition. */ } @@ -5858,7 +5858,7 @@ findComments(Archive *fout, Oid classoid, Oid objoid, /* * Pre-7.2, pg_description does not contain classoid, so collectComments - * just stores a zero. If there's a collision on object OID, well, you + * just stores a zero. If there's a collision on object OID, well, you * get duplicate comments. */ if (fout->remoteVersion < 70200) @@ -6870,7 +6870,7 @@ dumpShellType(Archive *fout, ShellTypeInfo *stinfo) /* * Note the lack of a DROP command for the shell type; any required DROP - * is driven off the base type entry, instead. This interacts with + * is driven off the base type entry, instead. This interacts with * _printTocEntry()'s use of the presence of a DROP command to decide * whether an entry needs an ALTER OWNER command. We don't want to alter * the shell type's owner immediately on creation; that should happen only @@ -6903,7 +6903,7 @@ dumpShellType(Archive *fout, ShellTypeInfo *stinfo) * * For some backwards compatibility with the older behavior, we forcibly * dump a PL if its handler function (and validator if any) are in a - * dumpable namespace. That case is not checked here. + * dumpable namespace. That case is not checked here. */ static bool shouldDumpProcLangs(void) @@ -7515,7 +7515,7 @@ dumpFunc(Archive *fout, FuncInfo *finfo) /* * COST and ROWS are emitted only if present and not default, so as not to - * break backwards-compatibility of the dump without need. Keep this code + * break backwards-compatibility of the dump without need. Keep this code * in sync with the defaults in functioncmds.c. */ if (strcmp(procost, "0") != 0) @@ -8294,7 +8294,7 @@ dumpOpclass(Archive *fout, OpclassInfo *opcinfo) * XXX RECHECK is gone as of 8.4, but we'll still print it if dumping * an older server's opclass in which it is used. This is to avoid * hard-to-detect breakage if a newer pg_dump is used to dump from an - * older server and then reload into that old version. This can go + * older server and then reload into that old version. This can go * away once 8.3 is so old as to not be of interest to anyone. */ appendPQExpBuffer(query, "SELECT amopstrategy, false AS amopreqcheck, " @@ -8507,7 +8507,7 @@ dumpOpfamily(Archive *fout, OpfamilyInfo *opfinfo) * XXX RECHECK is gone as of 8.4, but we'll still print it if dumping * an older server's opclass in which it is used. This is to avoid * hard-to-detect breakage if a newer pg_dump is used to dump from an - * older server and then reload into that old version. This can go + * older server and then reload into that old version. This can go * away once 8.3 is so old as to not be of interest to anyone. */ appendPQExpBuffer(query, "SELECT amopstrategy, false AS amopreqcheck, " @@ -9706,7 +9706,7 @@ dumpUserMappings(Archive *fout, * 'objCatId' is the catalog ID of the underlying object. * 'objDumpId' is the dump ID of the underlying object. * 'type' must be TABLE, FUNCTION, LANGUAGE, SCHEMA, DATABASE, or TABLESPACE. - * 'name' is the formatted name of the object. Must be quoted etc. already. + * 'name' is the formatted name of the object. Must be quoted etc. already. * 'subname' is the formatted name of the sub-object, if any. Must be quoted. * 'tag' is the tag for the archive entry (typ. unquoted name of object). * 'nspname' is the namespace the object is in (NULL if none). @@ -9774,7 +9774,7 @@ dumpTable(Archive *fout, TableInfo *tbinfo) tbinfo->relacl); /* - * Handle column ACLs, if any. Note: we pull these with a separate + * Handle column ACLs, if any. Note: we pull these with a separate * query rather than trying to fetch them during getTableAttrs, so * that we won't miss ACLs on system columns. */ @@ -10364,7 +10364,7 @@ dumpIndex(Archive *fout, IndxInfo *indxinfo) /* * If there's an associated constraint, don't dump the index per se, but - * do dump any comment for it. (This is safe because dependency ordering + * do dump any comment for it. (This is safe because dependency ordering * will have ensured the constraint is emitted first.) Note that the * emitted comment has to be shown as depending on the constraint, not * the index, in such cases. @@ -10697,7 +10697,7 @@ findLastBuiltinOid_V71(const char *dbname) * find the last built in oid * * For 7.0, we do this by assuming that the last thing that initdb does is to - * create the pg_indexes view. This sucks in general, but seeing that 7.0.x + * create the pg_indexes view. This sucks in general, but seeing that 7.0.x * initdb won't be changing anymore, it'll do. */ static Oid @@ -10854,7 +10854,7 @@ dumpSequence(Archive *fout, TableInfo *tbinfo) /* * Versions before 8.4 did not remember the true start value. If * is_called is false then the sequence has never been incremented - * so we can use last_val. Otherwise punt and let it default. + * so we can use last_val. Otherwise punt and let it default. */ if (!called) appendPQExpBuffer(query, " START WITH %s\n", last); @@ -11386,7 +11386,7 @@ getDependencies(void) /* * Ordinarily, table rowtypes have implicit dependencies on their - * tables. However, for a composite type the implicit dependency goes + * tables. However, for a composite type the implicit dependency goes * the other way in pg_depend; which is the right thing for DROP but * it doesn't produce the dependency ordering we need. So in that one * case, we reverse the direction of the dependency. diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 10ce6729a2..642997e6bd 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -76,10 +76,10 @@ typedef struct SimpleStringList * * NOTE: the structures described here live for the entire pg_dump run; * and in most cases we make a struct for every object we can find in the - * catalogs, not only those we are actually going to dump. Hence, it's + * catalogs, not only those we are actually going to dump. Hence, it's * best to store a minimal amount of per-object info in these structs, * and retrieve additional per-object info when and if we dump a specific - * object. In particular, try to avoid retrieving expensive-to-compute + * object. In particular, try to avoid retrieving expensive-to-compute * information until it's known to be needed. We do, however, have to * store enough info to determine whether an object should be dumped and * what order to dump in. @@ -323,7 +323,7 @@ typedef struct _triggerInfo } TriggerInfo; /* - * struct ConstraintInfo is used for all constraint types. However we + * struct ConstraintInfo is used for all constraint types. However we * use a different objType for foreign key constraints, to make it easier * to sort them the way we want. */ diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 541fed7f78..0008943236 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -21,7 +21,7 @@ static const char *modulename = gettext_noop("sorter"); /* * Sort priority for object types when dumping a pre-7.3 database. * Objects are sorted by priority levels, and within an equal priority level - * by OID. (This is a relatively crude hack to provide semi-reasonable + * by OID. (This is a relatively crude hack to provide semi-reasonable * behavior for old databases without full dependency info.) Note: text * search and foreign-data objects can't really happen here, so the rather * bogus priorities for them don't matter. @@ -226,11 +226,11 @@ sortDumpableObjects(DumpableObject **objs, int numObjs) * TopoSort -- topological sort of a dump list * * Generate a re-ordering of the dump list that satisfies all the dependency - * constraints shown in the dump list. (Each such constraint is a fact of a + * constraints shown in the dump list. (Each such constraint is a fact of a * partial ordering.) Minimize rearrangement of the list not needed to * achieve the partial ordering. * - * The input is the list of numObjs objects in objs[]. This list is not + * The input is the list of numObjs objects in objs[]. This list is not * modified. * * Returns TRUE if able to build an ordering that satisfies all the @@ -273,7 +273,7 @@ TopoSort(DumpableObject **objs, * linked list of items-ready-to-output as Knuth does, we maintain a heap * of their item numbers, which we can use as a priority queue. This * turns the algorithm from O(N) to O(N log N) because each insertion or - * removal of a heap item takes O(log N) time. However, that's still + * removal of a heap item takes O(log N) time. However, that's still * plenty fast enough for this application. */ @@ -337,9 +337,9 @@ TopoSort(DumpableObject **objs, } /*-------------------- - * Now emit objects, working backwards in the output list. At each step, + * Now emit objects, working backwards in the output list. At each step, * we use the priority heap to select the last item that has no remaining - * before-constraints. We remove that item from the heap, output it to + * before-constraints. We remove that item from the heap, output it to * ordering[], and decrease the beforeConstraints count of each of the * items it was constrained against. Whenever an item's beforeConstraints * count is thereby decreased to zero, we insert it into the priority heap @@ -467,7 +467,7 @@ removeHeapElement(int *heap, int heapLength) * before trying TopoSort again. We can safely repair loops that are * disjoint (have no members in common); if we find overlapping loops * then we repair only the first one found, because the action taken to - * repair the first might have repaired the other as well. (If not, + * repair the first might have repaired the other as well. (If not, * we'll fix it on the next go-round.) * * objs[] lists the objects TopoSort couldn't sort @@ -954,7 +954,7 @@ repairDependencyLoop(DumpableObject **loop, /* * If all the objects are TABLE_DATA items, what we must have is a * circular set of foreign key constraints (or a single self-referential - * table). Print an appropriate complaint and break the loop arbitrarily. + * table). Print an appropriate complaint and break the loop arbitrarily. */ for (i = 0; i < nLoop; i++) { diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 5e5472fb5f..3895c64f6b 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -459,9 +459,9 @@ main(int argc, char *argv[]) if (!data_only) { /* - * If asked to --clean, do that first. We can avoid detailed + * If asked to --clean, do that first. We can avoid detailed * dependency analysis because databases never depend on each other, - * and tablespaces never depend on each other. Roles could have + * and tablespaces never depend on each other. Roles could have * grants to each other, but DROP ROLE will clean those up silently. */ if (output_clean) @@ -1094,7 +1094,7 @@ dumpCreateDB(PGconn *conn) * commands for just those databases with values different from defaults. * * We consider template0's encoding and locale (or, pre-7.1, template1's) - * to define the installation default. Pre-8.4 installations do not have + * to define the installation default. Pre-8.4 installations do not have * per-database locale settings; for them, every database must necessarily * be using the installation default, so there's no need to do anything * (which is good, since in very old versions there is no good way to find |