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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names
Date: 2016-05-20 18:11:53
Message-ID: CAKFQuwb0jhaJZSsNKLJOuL+EXf9y8bLWQC+b6LmvYfXqdhLh2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, May 20, 2016 at 2:02 PM, John R Pierce <pierce(at)hogranch(dot)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 prior
> versions, thats the documented procedure for updating... I contend this
> *is* a bug. quote-all-identifiers is a workaround, for sure.
>
>
> ​This was my first reaction, and I suspect that we attempt to do this
already and that this one in just an oversight​.

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.
"""

​I'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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2016-05-20 18:12:33 Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names
Previous Message John R Pierce 2016-05-20 18:02:47 Re: BUG #14152: pg_dump does not take into account previous versions reserved keywords as column names