Skip site navigation (1) Skip section navigation (2)

Re: quotes in SET grammar

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Lockhart <thomas(at)fourpalms(dot)org>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: quotes in SET grammar
Date: 2002-02-26 16:05:02
Message-ID: 200202261605.g1QG52d28096@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Thomas Lockhart wrote:
> Christopher's patch to fix docs regarding single- and double-quotes in
> SET syntax got me looking at gram.y. It turns out that although we allow
> lists of double-quoted strings in SET, we do not allow lists of
> single-quoted strings (the latter should have been preferred afaik). And
> although we allow single-quoted strings in SET TIME ZONE, we do not
> allow double-quoted strings! So things seem inconsistant to me.
> 
> 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've got patches for the former, but am willing to consider either
> solution. afaik single-quoted strings would be sufficient to cover
> users' expectations, and all cases are extentions to SQL9x syntax, which
> only specifies SET TIME ZONE with a numeric offset. Comments?

I think only single quotes should be allowed.  These are strings.  The
double-quotes have such a different meaning in SQL that their use seems
confusing.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-02-26 16:08:21
Subject: Re: quotes in SET grammar
Previous:From: mlwDate: 2002-02-26 15:50:36
Subject: Re: PostgreSQL 8.0 ??

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group