On 05/18/18 15:50, Robert Haas wrote:
> On Thu, May 17, 2018 at 9:37 AM, Stefan Fercot <stefan.fer...@dalibo.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

Reply via email to