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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: quotes in SET grammar
Date: 2002-02-26 18:13:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Thomas Lockhart wrote:
> ...
> > I think it would be best to disallow the double-quoted form...
> > 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).
> Well, that would be how to distinguish them; we could define a new
> token, say "QIDENT" to refer to quoted identifiers and leave "IDENT" for
> the unquoted ones. Then a little work in gram.y should be enough to
> finish the job.
> The use of IDENT in gram.y is isolated to just a few places so
> introducing QIDENT would be almost trivial afaict.

Well, we allow single-quotes, and we allow no quotes.  People already
know they can quote identifiers and it only affects the case, so should
we explicitly disallow the double-quotes?  I don't see why, I guess. 
We certainly don't want to document the double-quotes though.

  Bruce Momjian                        |
  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 18:24:02
Subject: Re: COPY incorrectly uses null instead of an empty string in last field
Previous:From: Justin CliftDate: 2002-02-26 18:09:32
Subject: Re: PostgreSQL 8.0 ??

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