Skip site navigation (1) Skip section navigation (2)

Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, <pgsql-bugs(at)postgresql(dot)org>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Geoff Tolley" <geoff(dot)tolley(at)yougov(dot)com>
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Date: 2009-10-08 16:01:11
Message-ID: 4ACDC677020000250002B744@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
 
> ... Actually, I just noticed that there *is* a bug here:
> 
> regression=# select '1' /* foo
> regression*# */
> regression-# '2';
> ERROR:  syntax error at or near "'2'"
> LINE 3: '2';
>         ^
> regression=# 
> 
> The above should be accepted, but it isn't.
 
It works with the -- comment format.  Has the C format been added to
the standard, or is it an extension?  If the latter, support for it
would be up to the PostgreSQL community -- it's only a bug if we say
it is.
 
cc=> select 'a' --comment
'b';
 ?column?
----------
 ab
(1 row)

cc=> select 'a' -- comment
-- comment
'b';
 ?column?
----------
 ab
(1 row)
 
-Kevin

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-10-08 16:06:10
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Previous:From: Tom LaneDate: 2009-10-08 15:38:12
Subject: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group