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

From Tom Lane
Subject Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Date
Msg-id 15737.1276179933@sss.pgh.pa.us
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>)
Responses Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
List pgsql-bugs
Bruce Momjian <bruce@momjian.us> writes:
> 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.

Yeah, and not only that, but you'd need the *old* server to cooperate.

Which means BTW that "use the newer pg_dump" is only an 80% solution.
So maybe we do need to think about this.

The least invasive answer that I can think of is to invent a "force
quoting" GUC that's looked at by all the deparsing functions used by
pg_dump.  We have pg_dump set that once, on backend versions that
support it, and then we don't have to run around touching every single
deparsing function's signature (and adding extra code paths in pg_dump
to deal with older versions not having such functions).

But the earliest this could be of use would be a 9.1->9.2 update ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: BUG #5488: pg_dump does not quote column names -> pg_restore may fail when upgrading