From: | Stefan Fercot <stefan(dot)fercot(at)dalibo(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Fwd: Question about xmloption and pg_restore |
Date: | 2018-05-17 13:37:42 |
Message-ID: | b3b6b442-feb0-3e14-09ae-65529dab7800@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2018-05-17 13:38:36 | Re: Postgres 11 release notes |
Previous Message | Michael Paquier | 2018-05-17 13:35:53 | Re: Postgres 11 release notes |