Hi all,
I've got some question about XML OPTION and pg_restore.
In a xml type column are stored documents.
When restoring a plain SQL dump, we got the message :
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.
Now, with the "custom" format, we have to use before pg_restore : export PGOPTIONS="-c xmloption=DOCUMENT".
Do you think of any other way to solve this issue ?
What if we got the 2 xml options used in the database?
Would it be possible to have something like : ALTER TABLE ... ALTER COLUMN ... SET XML OPTION ...; ?
Kind regards,
--
Stefan FERCOT
http://dalibo.com - http://dalibo.org