
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



Tue, 24 Feb 2004 10:47:14 -0500
Andrew Dunstan <andrew@dunslane.net>
dollar quoting nits
Andrew Dunstan <andrew@dunslane.net> writes:
> 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.

I think we had agreed to "same rules as identifiers, except for $".

> 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.

I agree, there is no reason to truncate.

			regards, tom lane

Tue, 24 Feb 2004 11:16:30 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: dollar quoting nits 