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

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Дата
Msg-id 4ACDC677020000250002B744@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Tom Lane <tgl@sss.pgh.pa.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

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

Предыдущее
От: Dominic Bevacqua
Дата:
Сообщение: incorrect exit code from psql with single transaction + violation of deferred FK constraint
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped