Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 65E6D9FB260 for ; Fri, 3 Nov 2006 02:46:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 03689-03 for ; Fri, 3 Nov 2006 02:46:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from shrek.krogh.cc (shrek.krogh.cc [81.7.132.92]) by postgresql.org (Postfix) with ESMTP id 31FD49FA4AD for ; Fri, 3 Nov 2006 02:46:29 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id 2027C19735E; Fri, 3 Nov 2006 07:46:28 +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 j0rO49OvoQki; Fri, 3 Nov 2006 07:46:19 +0100 (CET) Received: from [10.48.2.243] (unknown [217.116.235.65]) by shrek.krogh.cc (Postfix) with ESMTP id 2C8F319735C; Fri, 3 Nov 2006 07:46:19 +0100 (CET) Message-ID: <454AE5B5.4050106@krogh.cc> Date: Fri, 03 Nov 2006 07:46:13 +0100 From: Jesper Krogh User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: Tom Lane CC: Aaron Bono , pgsql-sql@postgresql.org Subject: Re: The empty list? References: <454A654B.2000306@krogh.cc> <21991.1162506863@sss.pgh.pa.us> <454ADB6F.9070602@krogh.cc> <26899.1162535774@sss.pgh.pa.us> In-Reply-To: <26899.1162535774@sss.pgh.pa.us> 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-Archive-Number: 200611/35 X-Sequence-Number: 26687 Tom Lane wrote: > Jesper Krogh writes: >> ... the right-hand-side of on >> in operation will allways be a list (if I havent forgotten something). > > IN (SELECT ...) for one thing. Isn't that "just" a list of rows(complex value) instead of an list of types(simple values)? >> ... but missing SQL for the empty list basically means that >> we cant handle the empty set encoded in the empty array without >> explicitly introducing code for this size of array. From a >> programatically viewpoint, this seems quite odd. > > FWIW, as of 8.2 the best option will probably be to use > "col = ANY (array)", which does support zero-length arrays > if you use either an out-of-line parameter or an array literal. That looks nice.. is ANY in the SQL-spec? Jesper -- Jesper Krogh, jesper@krogh.cc