]> granicus.if.org Git - postgresql/commitdiff
Ensure xmloption = content while restoring pg_dump output.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Mar 2019 20:51:26 +0000 (16:51 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 23 Mar 2019 20:51:26 +0000 (16:51 -0400)
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

src/bin/pg_dump/pg_backup_archiver.c

index 9dd2c36db39f59a12eed9906469de23fefff2107..18cde557fb4e1cdc624a4ffc27c8230fe42093a7 100644 (file)
@@ -2958,6 +2958,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)