postgres.git / summary / log / commit / refs

commit    de922529fe6211acc008f69a61912e5848091b37
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Sat Mar 23 20:51:25 2019 +0000
First released in: 12.0, 9.4.22, 9.5.17, 9.6.13, 10.8, 11.3

    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


src/bin/pg_dump/pg_backup_archiver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 8f318ae4044..a68458fa91b 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -3074,6 +3074,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) [parent: 754ffcd42006]