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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)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>, 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 14:35:10
Message-ID: 20100610143510.GA21875@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> >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.

So, that strikes me as the main argument against adding this- code
complexity and/or duplication, etc. That being said, I'm less than
convinced that it's really all that big of an issue when we're talking
about a "quote-everything" flag. That doesn't require figuring out what
the reserved words are or anything along those lines that quote_ident()
currently deals with. It's plain-jane "search for characters that need
to be quoted and handle them appropriately". Sure, if we can find a way
to stick that actual source code somewhere that all the pieces which
need it can get to it w/o code duplication, that'd be great, but it just
doesn't feel like a hard problem to solve or one that requires a huge
amount of code..

Thanks,

Stephen

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2010-06-10 14:38:59 Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Previous Message Tom Lane 2010-06-10 14:34:35 Re: Beta 2 build issue