dollar quoting nits

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: dollar quoting nits
Date: 2004-02-24 15:47:14
Message-ID: 403B7202.1060802@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2004-02-24 15:57:23 Re: Sparc optimizations
Previous Message scott.marlowe 2004-02-24 15:45:12 Re: Sparc optimizations