Re: quotes in SET grammar - Mailing list pgsql-hackers

From Tom Lane
Subject Re: quotes in SET grammar
Date
Msg-id 206.1014739701@sss.pgh.pa.us
Whole thread Raw
In response to quotes in SET grammar  (Thomas Lockhart <thomas@fourpalms.org>)
Responses Re: quotes in SET grammar  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Thomas Lockhart <thomas@fourpalms.org> writes:
> Possible cases look like

>   SET TIME ZONE 'pst8pdt';
>   SET TIME ZONE "pst8pdt";
>   SET DATESTYLE = "US","ISO";

> Is there any objection to allowing both single- and double-quoted
> strings in SET? Or should I remove the double-quoted variety altogether?

I think it would be best to disallow the double-quoted form.  If we
allow it, then we will have a backwards-compatibility problem should
we ever want to generalize SET to accept an expression (because
double-quoted things are identifiers, not literals).

However, I'm not sure *how* to disallow it without also disallowing
unquoted words (since ultimately the productions reduce to ColId,
and the lexer output doesn't distinguish quoted and unquoted
identifiers).  I don't think I want to go back to writingset whatever to 'on';
so I guess I'll have to just grin and bear it.

I agree that all the forms of SET should be consistent about what
kinds of quoted or unquoted words they will take.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: quotes in SET grammar
Next
From: Oliver Elphick
Date:
Subject: COPY incorrectly uses null instead of an empty string in last field