Fwd: Question about xmloption and pg_restore

Поиск
Список
Период
Сортировка
От Stefan Fercot
Тема Fwd: Question about xmloption and pg_restore
Дата
Msg-id b3b6b442-feb0-3e14-09ae-65529dab7800@dalibo.com
обсуждение исходный текст
Ответы Re: Question about xmloption and pg_restore
Список 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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Postgres 11 release notes
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Postgres 11 release notes