aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-03-23 16:51:25 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-03-23 16:51:25 -0400
commit7c89f350f109a187740b6f635c97871d6cc46ac1 (patch)
tree0a8b0418c196e4e4cf31e4330c279b5fd79f9f18
parent849f87a1c3346df65d0e21b2d4b1c296a61495d5 (diff)
downloadpostgresql-7c89f350f109a187740b6f635c97871d6cc46ac1.tar.gz
postgresql-7c89f350f109a187740b6f635c97871d6cc46ac1.zip
Ensure xmloption = content while restoring pg_dump output.
In combination with the previous commit, this ensures that valid XML data can always be dumped and reloaded, whether it is "document" or "content". Discussion: https://postgr.es/m/CAN-V+g-6JqUQEQZ55Q3toXEN6d5Ez5uvzL4VR+8KtvJKj31taw@mail.gmail.com
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 1b4046d9667..01b4af64f61 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -3142,6 +3142,9 @@ _doSetFixedOutputState(ArchiveHandle *AH)
/* Make sure function checking is disabled */
ahprintf(AH, "SET check_function_bodies = false;\n");
+ /* Ensure that all valid XML data will be accepted */
+ ahprintf(AH, "SET xmloption = content;\n");
+
/* Avoid annoying notices etc */
ahprintf(AH, "SET client_min_messages = warning;\n");
if (!AH->public.std_strings)