Re: BUG #2164: Very minor, very low priority SQL parser 'bug' with /* */ comments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "John Engelhart" <johne_ganz(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2164: Very minor, very low priority SQL parser 'bug' with /* */ comments
Date: 2006-01-11 07:45:14
Message-ID: 9455.1136965514@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"John Engelhart" <johne_ganz(at)yahoo(dot)com> writes:
> It looks like there's a minor problem with the SQL parser where it tokenizes
> any */ to mean 'end of comment block'.

You appear to be suggesting that given

/* ... $$ ... */

the parser should think that the $$ is significant. Sorry, that's *not*
going to happen, as it's undeniably contrary to the letter and spirit of
the SQL spec. Per spec, comments are insensitive to any contents except
*/ and /*. We can bolt on the nonstandard $$ syntax in contexts where
that would be a syntax error, but we can't redefine the meaning of text
that the spec has a clear interpretation for.

If that wasn't what you meant, please clarify ...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Volkan YAZICI 2006-01-11 10:42:14 Re: BUG #2161: ILIKE does not work with german umlauts in UTF8
Previous Message Peter Eisentraut 2006-01-11 07:39:23 Re: BUG #2164: Very minor, very low priority SQL parser 'bug' with /* */ comments