Skip site navigation (1) Skip section navigation (2)

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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, Hartmut Goebel <h(dot)goebel(at)goebel-consult(dot)de>, 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-07 00:32:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Sun, Jun 6, 2010 at 2:53 PM, Dimitri Fontaine <dfontaine(at)hi-media(dot)com> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> Well as Bruce said this option won't solve the OP's problem, unless the
>>> application he's using for managing the backups do use the option.
>> Well, that's a pretty trivial change to the backup script.  +1 from me on
>> providing a pg_dump option.
> The application still have to have been using the option in the past.

Well, if your point is that it's too late to help anyone upgrading
from 8.3 to 8.4, then I agree with you.  But we will likely add more
keywords at some point in the future, and while providing an output
format that quotes everything won't fix every potential problem, it
might make life easier for some people.  I certainly have had times
where it would have saved me hassle and aggravation.

I think as a community we can sometimes be a bit intolerant of people
who don't do things exactly the right way and get themselves into
trouble.  I don't think we should tell people "there is a theoretical
way that you could have avoided falling down that pit so it's all
good" - we should try to build fences around the pits.  There's no way
we can future-proof pg_dump output completely because we don't know
what we'll change in the future, but I don't think that makes it
worthless to provide an option that makes it future-proof against one
of the common causes of trouble.  If I had a nickle for every time I
read a bug report about a usability issue that has also bitten me, I'd
have about two bucks.  If I had another nickle for every time someone
told one of those people their problem is their own fault, I would
have about another four bucks.  The fact that it's true doesn't mean
that it's the best we can do.

Robert Haas
The Enterprise Postgres Company

In response to


pgsql-bugs by date

Next:From: Tom LaneDate: 2010-06-07 01:50:03
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Previous:From: Dimitri FontaineDate: 2010-06-06 19:51:11
Subject: Re: Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group