dollar quoting nits

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема dollar quoting nits
Дата
Msg-id 403B7202.1060802@dunslane.net
обсуждение исходный текст
Ответы Re: dollar quoting nits  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have 2 small questions.

1. Is there any reason to exclude underscore as the first char of a 
dollar quoting delimiter (after the $), e.g. $_foo_$? I'm happy either 
way, just want to be as liberal as is reasonable.

2. David Fetter asked me the other day if there was any limit on the 
length of the foo inside the $foo$. I glibly told him that I thought 
that we should treat it the same as identifiers, but I have pretty much 
convinced myself that this is wrong. The reason for having limits on 
identifier length is for our convenience, not to protect programmers 
from doing silly things, ISTM. There are places in the code where we put 
names in statically sized buffers etc. with the size set to NAMEDATALEN. 
Changing this would be far more trouble than it is worth, even if it 
were possible. However, none of this applies in the case of $foo$, which 
in fact never makes it outside the lexer at all - the lexer just returns 
the contents as another string. Truncating the delimiter would actually 
make doing sane lexical recognition substantially harder, and Tom's 
original POC patch didn't contain any limit, so I'm intending not to 
place any limit. Does this seem OK?

cheers

andrew




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [pgsql-hackers-win32] Win32 regression test status
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Sparc optimizations