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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names
Дата
Msg-id CAKFQuwb0jhaJZSsNKLJOuL+EXf9y8bLWQC+b6LmvYfXqdhLh2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names  (John R Pierce <pierce@hogranch.com>)
Ответы Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, May 20, 2016 at 2:02 PM, John R Pierce <pierce@hogranch.com> wrote:

> On 5/20/2016 10:56 AM, Kevin Grittner wrote:
>
> ... 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.
>
>
> pg_dump and pg_dumpall are supposed to be able to dump all supported prio=
r
> versions, thats the documented procedure for updating...    I contend thi=
s
> *is* a bug.   quote-all-identifiers is a workaround, for sure.
>
>
> =E2=80=8BThis was my first reaction, and I suspect that we attempt to do =
this
already and that this one in just an oversight=E2=80=8B.

If indeed the prescribed procedure is quote-all-identifiers I'd say we
should at least update the docs.

"""
Force quoting of all identifiers. This may be useful when dumping a
database for migration to a future version that may have introduced
additional keywords.
"""

=E2=80=8BI'd probably say something like:

"It is recommended to use this option when performing dumps intended for
migration or when dealing with a version of PostgreSQL different than
pg_dump.  This is because the recognized keywords sometimes change between
major versions but only the quoting rules of the pg_dump version are
applied."

This doesn't seem to make its way that often to these lists otherwise I'd
recommend we add a "no-force-quote-identifiers" option and default to this
behavior.

David J.

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

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