Re: pg_restore silently chokes on object comments/descriptions ending in a backslash

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore silently chokes on object comments/descriptions ending in a backslash
Дата
Msg-id 23791.1311737234@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_restore silently chokes on object comments/descriptions ending in a backslash  (Julian Mehnle <julian@mehnle.net>)
Ответы Re: pg_restore silently chokes on object comments/descriptions ending in a backslash  (Julian Mehnle <julian@mehnle.net>)
Список pgsql-bugs
Julian Mehnle <julian@mehnle.net> writes:
> If the comment/description of a database object (table, function, etc.)
> ends in a backslash (which generally works fine otherwise), then
> pg_restore is unable to completely restore a custom-format dump of the
> schema.

Reproduced here against HEAD.  The problem seems to be that
pg_backup_db.c's _sendSQLLine() contains a mini SQL lexer that is not
cognizant of standard_conforming_strings.  Not sure about a simple fix,
and I rather wonder if we shouldn't try to remove that code entirely
instead of "fix" it.

As a temporary workaround, the SQL text file that pg_restore produces
by default seems to be valid, so you could pipe that into psql.

            regards, tom lane

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

Предыдущее
От: Julian Mehnle
Дата:
Сообщение: pg_restore silently chokes on object comments/descriptions ending in a backslash
Следующее
От: Julian Mehnle
Дата:
Сообщение: Re: pg_restore silently chokes on object comments/descriptions ending in a backslash