Re: extended stats objects are the only thing written like "%s"."%s" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: extended stats objects are the only thing written like "%s"."%s"
Date
Msg-id 1050792.1630180101@sss.pgh.pa.us
Whole thread Raw
In response to extended stats objects are the only thing written like "%s"."%s"  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I think using "%s.%s" as is done everywhere else is pretty much
> pointless.  It's not usable as an object identifier, since you have to
> make sure to remove the existing quotes, and unless the names work
> without quotes, you have to add different quotes.  So it looks «nice»
> but it's functionally more work.

I think what we are doing there is following the message style
guideline that says to put double quotes around inserted strings.
In this case schema.object (as a whole) is the inserted string.
People often confuse this with SQL double-quoted identifiers, but it
has nothing whatsoever to do with SQL's rules.  (It's easier to make
sense of this rule in translations where the quote marks are not
ASCII double-quotes ... like your example with «nice».)

In short: Justin is right, this should not be done this way.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: extended stats objects are the only thing written like "%s"."%s"
Next
From: Daniel Gustafsson
Date:
Subject: Re: pg_receivewal: remove extra conn = NULL; in StreamLog