Re: Re: Question about xmloption and pg_restore

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Stefan Fercot <stefan(dot)fercot(at)dalibo(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Question about xmloption and pg_restore
Date: 2018-10-25 02:26:31
Message-ID: 5BD129D7.5030209@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/18/18 15:50, Robert Haas wrote:
> On Thu, May 17, 2018 at 9:37 AM, Stefan Fercot <stefan(dot)fercot(at)dalibo(dot)com> wrote:
>> ERROR: invalid XML content
>> DETAIL: line 1: StartTag: invalid element name
>> <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
>> ^
>> CONTEXT: COPY layer_styles, line 1, column styleqml: "<!DOCTYPE qgis PUBLIC
>> 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
>>
>> Adding "SET XML OPTION DOCUMENT;" in top of the dump file allows to restore
>> it.
>
> Hmm. I thought that xmloption = 'content' was supposed to be strictly
> more permissive than xmloption = 'document'.

In the spirit of not leaving a good question hanging, this turns out to be
a difference between the 2003 SQL/XML standard (which PG implements) and
the later versions, which changed the data model so there really is a
containment relationship between 'content' and 'document'.

https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL/XML_Standards#XML_OPTION

-Chap

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2018-10-25 02:41:44 Re: Should pg 11 use a lot more memory building an spgist index?
Previous Message Chapman Flack 2018-10-25 02:19:56 PostgreSQL vs SQL/XML Standards