Re: Dollar in identifiers
Bruce Momjian <pgman@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Jan Wieck <JanWieck@yahoo.com>
Cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Date: 2001-08-15T19:21:21Z
Lists: pgsql-hackers
> > > In order to lower porting issues, I think it'd be nice to add > > > that to PostgreSQL as well. It's two more characters in > > > scan.l and doesn't break the regression test. > > > > > > Objections? > > > > Yes. We would move from standard C identifiers to $ identifiers. We > > have had zero requests for this so I see no need to add it. > > Standard C? I was talking about *allowing* the dollar > character in table-, column-, function-names! > > And not all requests show up directly on the mailing lists > any more. We'll see those (compatibility) requeses from > Toronto as well pretty soon I guess. > > The thing is that the dollar isn't mentioned in the > definition of the <SQL terminal character> (chapter 5.1 of > SQL3) at all. But all DB vendors seem to treat it at least as > <SQL language identifier part>. > > 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 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. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026