Re: Dollar in identifiers

Поиск
Список
Период
Сортировка
От Ian Lance Taylor
Тема Re: Dollar in identifiers
Дата
Msg-id si66bpm5dp.fsf@daffy.airs.com
обсуждение исходный текст
Ответ на Re: Dollar in identifiers  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.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
poundsign ('#')
 

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Dollar in identifiers
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Dollar in identifiers