Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Hartmut Goebel <h(dot)goebel(at)goebel-consult(dot)de>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date: 2010-06-10 13:45:43
Message-ID: 201006101345.o5ADjhY28034@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Stefan Kaltenbrunner wrote:
> > I do agree that the human readability of pg_dump is an asset in many
> > situations - I have often dumped out the DDL for particular objects
> > just to look at it, for example. However, I emphatically do NOT agree
> > that leaving someone with a 500MB dump file (or, for some people on
> > this list, a whole heck of a lot larger than that) that has to be
> > manually edited to reload is a useful behavior. It's a huge pain in
> > the neck.
>
> well that's why we recommend to use the new version of pg_dump to dump
> the old cluster if the intention is an upgrade not sure that is any more
> pain than manually hacking the dump...

Or rename the identifier in the old cluster and modify the application
before doing the upgrade.

The only valid reason I have heard for allowing this flag (default off),
is that some application stacks quote all identifiers and therefore
there would be no need to ever change the name of the identifier.

In fact, such stacks might already have many identifers that require
quoting, like a table called "select". The problem is that some of our
reserved keywords change from release to release, and using the old
pg_dump causes problems. It is sufficient to require people using such
application stacks to use the new pg_dump?

From a code perspective, the difficulting in adding such a flag is that
much of the quoting happens inside the backend, not by pg_dump, and
therefore there is significant code change required to add this flag.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-06-10 13:47:58 Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Previous Message Tom Lane 2010-06-10 13:39:39 Re: pg_restore ignores -C when using a restore list -L