Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names
Дата
Msg-id CACjxUsOnn1xpEMMC+8xQ9_k_Mt5pZznPnuoR3c6cnZOuwnHZKA@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names  (alejandro@cartodb.com)
Ответы Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names  (John R Pierce <pierce@hogranch.com>)
Список pgsql-bugs
On Fri, May 20, 2016 at 12:58 PM,  <alejandro@cartodb.com> wrote:

> - On that database run: CREATE TABLE test(foo int, "over" test, bar int);.
> Note that "over" is a keyword which apparently went from reserved to
> non-reserved on 9.4 release.
> - Use a 9.5.3 pg_dump to dump the database.
>
> It fails with:
>
> pg_dump: [archiver (db)] query failed: ERROR:  syntax error at or near
> "over"
> LINE 1: COPY public.test (foo, over, bar) TO stdout;
>                                ^
> pg_dump: [archiver (db)] query was: COPY public.test (foo, over, bar) TO
> stdout;
>
> Using a 9.3 pg_dump will quote the "over" column name and properly finish
> the dump.

... or use the --quote-all-identifiers option of 9.5 pg_dump.

http://www.postgresql.org/docs/9.5/static/app-pgdump.html

Not a bug.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: alejandro@cartodb.com
Дата:
Сообщение: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names
Следующее
От: John R Pierce
Дата:
Сообщение: Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names