PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15273
PG Version10.4
OSAny
Opened2018-07-10 17:15:13+00
Reported byYaroslav Schekin
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15273
Logged by:          Yaroslav Schekin
Email address:      (redacted)
PostgreSQL version: 10.4
Operating system:   Any
Description:        

Hello. 

Compare this:
> SELECT U&'a' UESCAPE 'x';
----------
 a
(1 row)
To this:
> SELECT U&'a' /*c1*/ UESCAPE /*c2*/ 'x';

ERROR:  syntax error at or near "'x'"
LINE 1: SELECT U&'a' /*c1*/ UESCAPE /*c2*/ 'x';
                                           ^
I think the former is a bug, as, per ISO SQL, a comment is equivalent to
whitespace (with newline), and therefore, should be ignored here.

(Thanks a lot to RhodiumToad who not only initially found and documented
https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard#Lexing_of_split_string_literals,
but also discussed it with me on IRC and conducted the investigation of
relevant SQL standards.)

-- 
WBR, Yaroslav Schekin.

Messages

DateAuthorSubject
2018-07-10 17:15:13+00=?utf-8?q?PG_Bug_reporting_form?=BUG #15273: Lexer bug with UESCAPE
2018-07-10 19:50:51+00Tom LaneRe: BUG #15273: Lexer bug with UESCAPE
2018-07-11 12:03:41+00Andrew GierthRe: BUG #15273: Lexer bug with UESCAPE
2018-07-11 21:05:05+00Tom LaneRe: BUG #15273: Lexer bug with UESCAPE
2018-07-11 21:15:15+00Tom LaneRe: BUG #15273: Lexer bug with UESCAPE
2018-08-07 17:46:56+00Bruce MomjianRe: BUG #15273: Lexer bug with UESCAPE