diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-03-23 16:51:25 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-03-23 16:51:37 -0400 |
commit | 4870dce37fab7ed308cee9856bec4d4c8c7590b3 (patch) | |
tree | c8c299bbfccae88b6e085103623e0388e5025b38 /src | |
parent | 8d1dadb25bb522e09af7f141e9d78db5805d868c (diff) | |
download | postgresql-4870dce37fab7ed308cee9856bec4d4c8c7590b3.tar.gz postgresql-4870dce37fab7ed308cee9856bec4d4c8c7590b3.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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 3 |
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 62bf1493aa2..2266c99b33f 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -3179,6 +3179,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) |