db_restore and xml data

Started by Enrico Sirolaabout 17 years ago3 messagesgeneral
Jump to latest
#1Enrico Sirola
enrico.sirola@gmail.com

Hello,
I have a pgsql database hosting xml data in xml columns. The data,
have <!DOCTYPE> declarations at the beginning, so it is saved with

XMLPARSE (DOCUMENT <text>)

when I try to restore a database from dump, pg_restore complains
because the data it tries to restore is not an xml content
(correctly), so what I usually do is to edit the postgresql.conf file,
change xmloption to 'document', reload the conf file and make
pg_restore happy.
However, the documentation (8.13.1) says

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

from this statement, it seems there are 'content' xmls which are not
'document' xmls and vice versa, so how do you proceed in this case? It
seems that potentially you could be unable to restore from a dump.
Thanks for your help,
Enrico

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Enrico Sirola (#1)
Re: db_restore and xml data

On Friday 27 February 2009 19:09:57 Enrico Sirola wrote:

Hello,
I have a pgsql database hosting xml data in xml columns. The data,
have <!DOCTYPE> declarations at the beginning, so it is saved with

XMLPARSE (DOCUMENT <text>)

when I try to restore a database from dump, pg_restore complains
because the data it tries to restore is not an xml content

Please give us a concrete, reproducible test case.

#3Shahbaz A. Tyagi
shahbaz.tyagi@sphere.ae
In reply to: Peter Eisentraut (#2)
Re: db_restore and xml data

The problem is sorted out, as it was in 2003 server and when we were
comparing it with XP one.

Thanks,

Shahbaz A. Tyagi

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Peter Eisentraut
Sent: Sunday, March 01, 2009 3:06 PM
To: pgsql-general@postgresql.org
Cc: Enrico Sirola
Subject: Re: [GENERAL] db_restore and xml data

On Friday 27 February 2009 19:09:57 Enrico Sirola wrote:

Hello,
I have a pgsql database hosting xml data in xml columns. The data,
have <!DOCTYPE> declarations at the beginning, so it is saved with

XMLPARSE (DOCUMENT <text>)

when I try to restore a database from dump, pg_restore complains
because the data it tries to restore is not an xml content

Please give us a concrete, reproducible test case.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general