The empty list? - Mailing list pgsql-sql

From Jesper Krogh
Subject The empty list?
Date
Msg-id 454A654B.2000306@krogh.cc
Whole thread Raw
Responses Re: The empty list?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi.

Is there someone who can elaborate on why the "empty list" is'nt
implemented in Postgresql?

This works:
# select 1 in (1,2,3);?column?
----------t
(1 row)

And this works:
jesper=# select * from test;id
----
(0 rows)

jesper=# select 1 in (select id from test);?column?
----------f
(1 row)

Whereas this gives a syntax error:

# select 1 in ();
ERROR:  syntax error at or near ")" at character 14
LINE 1: select 1 in ();                    ^
If everyone where writing their SQL by hand .. this would probably not
be a problem, but nowadays lots of people use ORM's for accessing the
database.. thus it would be nice if the SQL implementation was a bit
more generic like a "language".

Jesper
-- 
Jesper Krogh, jesper@krogh.cc



pgsql-sql by date:

Previous
From: Dave Page
Date:
Subject: Re: [GENERAL] Is there anyway to...
Next
From: Tom Lane
Date:
Subject: Re: The empty list?