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

From Stephen Frost
Subject Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date
Msg-id 20100610143510.GA21875@tamriel.snowman.net
Whole thread Raw
In response to Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
* Bruce Momjian (bruce@momjian.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Beta 2 build issue
Next
From: Stephen Frost
Date:
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading