Re: Dollar in identifiers

From: Ian Lance Taylor <ian(at)airs(dot)com>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: 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 20:32:02
Message-ID: si66bpm5dp.fsf@daffy.airs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:

> Bruce Momjian wrote:
> > We do currently use $1 for params, so allowing dollar in the middle
> > seems better. However, I need to see multiple people who need it before
> > I would say OK. If we go adding things because _one_ person wants it,
> > we will end up with a mess. Someone is working on an
> > Oracle-compatibility parser. It would be OK in there.
>
> Exactly that was my first response in the meeting yesterday.
> Put it into the Oracle-compatibility parser when we have it.
> The question is "will we for sure have that parser and
> when?".
>
> But let's see. Is there anybody else out there who would like
> this feature? Ian?

The $ issue isn't one I've run into in practice. The schemas which
I've seen don't use it. (Of course, that just means that tomorrow
I'll see one which does use it.)

As you probably know, the Oracle rules on names are:

* 1 to 30 characters long
* must start with an alphabetic character from database character set
* may contain only alphanumeric characters from database character
set, or underscore ('_'), dollar sign ('$'), or pound sign ('#')

Even I would not argue that the pound sign should be permitted in
Postgres identifiers. I do think that permitting dollar signs would
do no harm and might help some people.

As far as the comparison with C identifiers goes, I'll note that many
C compilers permit using a dollar sign in an identifier. For example,
gcc does:
http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_5.html#SEC96

Ian

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-08-15 20:58:31 Re: Dollar in identifiers
Previous Message Peter Eisentraut 2001-08-15 20:08:25 Re: Dollar in identifiers