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

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

From
Unprivileged user
Date:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Diab Jerius
Your email address      : djerius@cfa.harvard.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:
---------


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