BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped - Mailing list pgsql-bugs

From Geoff Tolley
Subject BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Date
Msg-id 200910072348.n97NmNIn067659@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Re: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5102
Logged by:          Geoff Tolley
Email address:      geoff.tolley@yougov.com
PostgreSQL version: 8.3.8
Operating system:   Ubuntu 8.04 x86_64
Description:        Silent IN (list of strings) failure to detect syntax
error when list is linewrapped
Details:

I would expect the last of these queries to give the same syntax error as
the penultimate one.  Reproducible on my test instance of 8.4.1 as well:


postgres=# SELECT version();
                                             version
----------------------------------------------------------------------------
---------------------
 PostgreSQL 8.3.8 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.4
(Ubuntu 4.2.4-1ubuntu3)
(1 row)

postgres=# SELECT 'hello' WHERE '1' IN ('1', '2');
 ?column?
----------
 hello
(1 row)

postgres=# SELECT 'hello' WHERE '1' IN ('1' '2');
ERROR:  syntax error at or near "'2'"
LINE 1: SELECT 'hello' WHERE '1' IN ('1' '2');
                                         ^
postgres=# SELECT 'hello' WHERE '1' IN ('1'
postgres(#  '2');
 ?column?
----------
(0 rows)

pgsql-bugs by date:

Previous
From: "Herve LEFEBVRE"
Date:
Subject: BUG #5104: tsearch parser mislead
Next
From: "Walter Mesz"
Date:
Subject: BUG #5105: "Select Into Strict" does not throw NO_DATA_FOUND