aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 4db4e4b9e3a..35042f30504 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.129 2006/05/24 21:20:11 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.130 2006/05/26 23:48:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1900,9 +1900,11 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
{
teReqs res = REQ_ALL;
- /* ENCODING objects are dumped specially, so always reject here */
+ /* ENCODING and STDSTRINGS objects are dumped specially, so always reject */
if (strcmp(te->desc, "ENCODING") == 0)
return 0;
+ if (strcmp(te->desc, "STDSTRINGS") == 0)
+ return 0;
/* If it's an ACL, maybe ignore it */
if ((!include_acls || ropt->aclsSkip) && strcmp(te->desc, "ACL") == 0)
@@ -2005,15 +2007,14 @@ _doSetFixedOutputState(ArchiveHandle *AH)
{
TocEntry *te;
- /* If we have an encoding setting, emit that */
+ /* If we have an encoding or std_strings setting, emit that */
te = AH->toc->next;
while (te != AH->toc)
{
if (strcmp(te->desc, "ENCODING") == 0)
- {
ahprintf(AH, "%s", te->defn);
- break;
- }
+ if (strcmp(te->desc, "STDSTRINGS") == 0)
+ ahprintf(AH, "%s", te->defn);
te = te->next;
}
@@ -2042,7 +2043,7 @@ _doSetSessionAuth(ArchiveHandle *AH, const char *user)
* SQL requires a string literal here. Might as well be correct.
*/
if (user && *user)
- appendStringLiteral(cmd, user, false);
+ appendStringLiteral(cmd, user, false, true);
else
appendPQExpBuffer(cmd, "DEFAULT");
appendPQExpBuffer(cmd, ";");