Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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:
---------


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


pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group