Should pg_upgrade use --quote-all-identifiers?

Started by Tom Lanealmost 13 years ago5 messageshackers
Jump to latest
#1Tom 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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#1)
Re: Should pg_upgrade use --quote-all-identifiers?

On Wed, May 1, 2013 at 12:55 AM, Tom Lane <tgl@sss.pgh.pa.us> 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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: Should pg_upgrade use --quote-all-identifiers?

Greg Stark <stark@mit.edu> 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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: Should pg_upgrade use --quote-all-identifiers?

On Wed, May 1, 2013 at 2:23 AM, Tom Lane <tgl@sss.pgh.pa.us> 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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#1)
Re: Should pg_upgrade use --quote-all-identifiers?

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 <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers