Should pg_upgrade use --quote-all-identifiers?

Поиск
Список
Период
Сортировка
Искать

Should pg_upgrade use --quote-all-identifiers?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Seems like this might be a good idea to avoid the type of failure
exhibited in bug #8128.  We don't care too much about the readability
of the dump script created during an upgrade, so it's hard to see a
downside.
		regards, tom lane


Re: Should pg_upgrade use --quote-all-identifiers?

От:
Greg Stark <stark@mit.edu>
Дата:
On Wed, May 1, 2013 at 12:55 AM, Tom Lane  wrote:
> Seems like this might be a good idea to avoid the type of failure
> exhibited in bug #8128.  We don't care too much about the readability
> of the dump script created during an upgrade, so it's hard to see a
> downside.

Huh. I thought you were talking about quoting identifiers in an SQL
dump. But you're not, you're talking about quoting identifiers in sql
being sent to the server during the pg_dump process. Why did pg_dump
ever not quote all such identifiers?


-- 
greg


Re: Should pg_upgrade use --quote-all-identifiers?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Greg Stark  writes:
> Huh. I thought you were talking about quoting identifiers in an SQL
> dump. But you're not, you're talking about quoting identifiers in sql
> being sent to the server during the pg_dump process. Why did pg_dump
> ever not quote all such identifiers?

Well, readability of those commands is worth something too, but in any
case the short answer is that pg_dump has only one quote-an-identifier
function, not different ones for server commands and final output.
		regards, tom lane


Re: Should pg_upgrade use --quote-all-identifiers?

От:
Greg Stark <stark@mit.edu>
Дата:
On Wed, May 1, 2013 at 2:23 AM, Tom Lane  wrote:
> Well, readability of those commands is worth something too, but in any
> case the short answer is that pg_dump has only one quote-an-identifier
> function, not different ones for server commands and final output.

Well for the final output one reason it's nice not to quote is that it
makes it easier to use the SQL generated by --inserts on a
non-postgres database. Mainly I'm thinking of the case issue but also
some databases use strange quoting rules.

-- 
greg


Re: Should pg_upgrade use --quote-all-identifiers?

От:
Bruce Momjian <bruce@momjian.us>
Дата:
On Tue, Apr 30, 2013 at 07:55:33PM -0400, Tom Lane wrote:
> Seems like this might be a good idea to avoid the type of failure
> exhibited in bug #8128.  We don't care too much about the readability
> of the dump script created during an upgrade, so it's hard to see a
> downside.

Fine with me.

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com
 + It's impossible for everything to be true. +


FAQ