Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 8E1779FA646 for ; Thu, 2 Nov 2006 18:11:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.60]) (amavisd-new, port 10024) with ESMTP id 19956-04 for ; Thu, 2 Nov 2006 18:11:03 -0400 (AST) X-Greylist: delayed 00:32:27.873799 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 5A6449FB27F for ; Thu, 2 Nov 2006 18:11:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from shrek.krogh.cc (shrek.krogh.cc [81.7.132.92]) by svr4.postgresql.org (Postfix) with ESMTP id 2607D5AF039 for ; Thu, 2 Nov 2006 21:38:34 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id A5CB419735E for ; Thu, 2 Nov 2006 22:38:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at shrek.krogh.cc Received: from shrek.krogh.cc ([127.0.0.1]) by localhost (shrek.krogh.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qFgk4CUDCN1i for ; Thu, 2 Nov 2006 22:38:23 +0100 (CET) Received: from [10.48.2.243] (unknown [217.116.235.65]) by shrek.krogh.cc (Postfix) with ESMTP id DAF0819735C for ; Thu, 2 Nov 2006 22:38:22 +0100 (CET) Message-ID: <454A654B.2000306@krogh.cc> Date: Thu, 02 Nov 2006 22:38:19 +0100 From: Jesper Krogh User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: The empty list? X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.448 tagged_above=0 required=5 tests=BAYES_05, RCVD_IN_BL_SPAMCOP_NET X-Spam-Level: X-Archive-Number: 200611/20 X-Sequence-Number: 26672 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