Re: Dollar in identifiers

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dollar in identifiers
Date: 2001-08-15 22:27:24
Message-ID: 200108152227.f7FMRO120640@jupiter.us.greatbridge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> > Could you live with it when we don't allow a name to start
> > with a dollar, but allow the dollar inside or at the end of
> > the name?
>
> We had *better* not allow an identifier to start with $ --- or have
> you forgotten about parameters?

Interestingly enough, allowing it did no break anything in
the regression test. And even PL/pgSQL functions are able to
deal with these objects out of the box.

> I tend to agree with Bruce on this; we have not seen any requests for
> this so far, and I don't much like the idea of decreasing our compliance
> with the standard without strong reason.
>
> I'm also concerned about changing the behavior of the lexer for
> parameter identifiers adjacent to keywords. "select$1from foo"
> might be horrible coding style, but who's to promise that there
> are no applications out there that emit things like that?

Does *that* work currently? Which application could possibly
emit such a statement. Parameters can only occur in server
side queries. So someone must do that crap over SPI.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-08-16 00:36:54 Rough idea for supporting "sequencename.nextval" syntax
Previous Message Hiroshi Inoue 2001-08-15 22:14:56 Re: PL/pgSQL bug?