Received: from localhost (uranus.hub.org [200.46.204.60]) by postgresql.org (Postfix) with ESMTP id 56D9A9FB2A6 for ; Fri, 3 Nov 2006 14:26:41 -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 86988-05 for ; Fri, 3 Nov 2006 14:26:35 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 0D1CD9FB299 for ; Fri, 3 Nov 2006 14:26:34 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id q2so432884uge for ; Fri, 03 Nov 2006 10:26:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=aPp8uOvdQcrgCU9i7qd44nZLd6OsTRCSLIDwS9x7yHb4XuJmteSaw8O6YJxEZvot56/wO4+NdnFtTkHIZN7D0fdS6q3sBOk1DCdnB+XJ0zQquqSmdgQENVb/cWB0MJdVhs3zudYL3t/Tif+6C7WhuJdZnQ+WwBNFd5B9Ob+so/U= Received: by 10.78.172.20 with SMTP id u20mr3303822hue.1162578393471; Fri, 03 Nov 2006 10:26:33 -0800 (PST) Received: by 10.78.136.6 with HTTP; Fri, 3 Nov 2006 10:26:33 -0800 (PST) Message-ID: Date: Fri, 3 Nov 2006 12:26:33 -0600 From: "Aaron Bono" To: "Jesper Krogh" Subject: Re: The empty list? Cc: "Tom Lane" , pgsql-sql@postgresql.org In-Reply-To: <454ADB6F.9070602@krogh.cc> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17247_20427823.1162578393429" References: <454A654B.2000306@krogh.cc> <21991.1162506863@sss.pgh.pa.us> <454ADB6F.9070602@krogh.cc> X-Google-Sender-Auth: 2e7443e942608ae6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/41 X-Sequence-Number: 26693 ------=_Part_17247_20427823.1162578393429 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/3/06, Jesper Krogh wrote: > > ... 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. > Somebody, somewhere has to programitacally handle the empty array. You are just suggesting that the database do it, not you. Also, if you were selecting anything from an empty list and your program knows it is from an empty list, why even bother asking the database. The additional checks in your code can help reduce database calls and increase performance. -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_17247_20427823.1162578393429 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/3/06, Jesper Krogh <jesper@krogh.cc> wrote:
... 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.

Somebody, somewhere has to programitacally handle the empty array.  You are just suggesting that the database do it, not you.

Also, if you were selecting anything from an empty list and your program knows it is from an empty list, why even bother asking the database.  The additional checks in your code can help reduce database calls and increase performance.

--
==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_17247_20427823.1162578393429--