pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ryan@rustprooflabs.com
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15342: pg_dump - XML with mixed content types generates invalid backup file
Date: Thu, 23 Aug 2018 11:24:55 -0400
Message-ID: <27956.1535037895@sss.pgh.pa.us> (raw)
In-Reply-To: <153478795159.1302.9617586466368699403@wrigleys.postgresql.org>
References: <153478795159.1302.9617586466368699403@wrigleys.postgresql.org>

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> It seems that `pg_dump` is unable to provide a reliable database backups
> that include specific combinations of XML data.  The following SQL Fiddle
> creates a table with three rows of XML data.  The first row, "Document, no
> DOCTYPE" is the only row of the three that will always load from a backup
> from `pg_dump`.  I've tried this one a few sub-versions of 9.6 and 9.5.  

Hm.  So there are two problems here: pg_dump neglects to force a safe
value of xmloption for the restore step, plus there doesn't seem to be
a safe value for it to force :-(.  The first part of that is trivial
to fix, the second perhaps not so much.  However, the fine manual quoth
(in 8.13 XML Type)

	SET xmloption TO { DOCUMENT | CONTENT };

	The default is CONTENT, so all forms of XML data are allowed.

which makes it seem that the CONTENT setting was intended to work for
this.  Perhaps somebody just got overenthusiastic about throwing errors?

			regards, tom lane




view thread (2+ messages)

Message-ID: <27956.1535037895@sss.pgh.pa.us>
Permalink:  ../27956.1535037895@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27956.1535037895@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ryan@rustprooflabs.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15342: pg_dump - XML with mixed content types generates invalid backup file
  In-Reply-To: <27956.1535037895@sss.pgh.pa.us>
  References: <153478795159.1302.9617586466368699403@wrigleys.postgresql.org> <27956.1535037895@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox