From: Jesper Krogh <jesper@krogh.cc>
To: pgsql-sql@postgresql.org
Subject: The empty list?
Date: Thu, 02 Nov 2006 22:38:19 +0100
Message-ID: <454A654B.2000306@krogh.cc> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jesper@krogh.cc
Subject: Re: The empty list?
In-Reply-To: <454A654B.2000306@krogh.cc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox