General Bug Report: missing commas in IN( ) ignored; bracketing entries ignored

From: Unprivileged user <nobody>
To: pgsql-bugs(at)postgresql(dot)org
Subject: General Bug Report: missing commas in IN( ) ignored; bracketing entries ignored
Date: 1999-04-26 14:34:22
Message-ID: 199904261434.KAA24872@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Diab Jerius
Your email address : djerius(at)cfa(dot)harvard(dot)edu

Category : runtime: front-end
Severity : non-critical

Summary: missing commas in IN( ) ignored; bracketing entries ignored

System Configuration
--------------------
Operating System : Solaris 2.6

PostgreSQL version : 6.4.2

Compiler used : Sunpro cc

Hardware:
---------

Versions of other tools:
------------------------
gmake 3.71
flex 2.5.4

--------------------------------------------------------------------------

Problem Description:
--------------------
In psql, if a list of entries in an IN ( ) statement is
split across several lines, missing commas are not flagged as errors,
but the entries immediately before and after the missing comma
are ignored

--------------------------------------------------------------------------

Test Case:
----------
The following sql shows the problem. Note the missing comma between
the 'c' and 'd' lines in the IN( ) clause. The query
should return no rows.

drop table test;

create table test ( s text );

insert into test values ( 'a' );
insert into test values ( 'b' );
insert into test values ( 'c' );
insert into test values ( 'd' );
insert into test values ( 'e' );

select
s
from
test
where
s not in (
'a',
'b',
'c'
'd',
'e'
)
order by s
;

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Browse pgsql-bugs by date

  From Date Subject
Next Message Unprivileged user 1999-04-26 17:28:31 General Bug Report: obscure error when misusing table name as an attribute
Previous Message Unprivileged user 1999-04-26 00:04:22 General Bug Report: Functions in SQL statements that use aggregations (i.e. group by) causes an abort in psql