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

From: "Geoff Tolley" <geoff(dot)tolley(at)yougov(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5102: Silent IN (list of strings) failure to detect syntax error when list is linewrapped
Date: 2009-10-07 23:48:23
Message-ID: 200910072348.n97NmNIn067659@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5102
Logged by: Geoff Tolley
Email address: geoff(dot)tolley(at)yougov(dot)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)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Renner 2009-10-08 00:26:16 BUG #5103: "pg_ctl -w (re)start" fails with custom unix_socket_directory
Previous Message Chris Mikkelson 2009-10-07 17:47:54 BUG #5101: Off-by-one error in bitncmp() in src/backend/utils/adt/network.c