Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AED179F93E4 for ; Thu, 2 Nov 2006 18:45:06 -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 90208-02 for ; Thu, 2 Nov 2006 18:44:53 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by postgresql.org (Postfix) with ESMTP id 22F6F9FA2B9 for ; Thu, 2 Nov 2006 18:44:49 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so235889ugf for ; Thu, 02 Nov 2006 14:44:48 -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=RpHgEKMq8sODunGPb8jgxYk2U3loThXuPFPj2CcUbrupN8yWsAJn6bDuHvO3UEqoDss6QeIE7eXNITQKizSMBu1bZGTCKuHytHEANzfWpryifsUqBZnOw9EcG7fpondAF+gO8LK3HEpb8csLDBluU0t/lTIPdteBrcEF98ppfMc= Received: by 10.78.83.13 with SMTP id g13mr1586050hub.1162507421391; Thu, 02 Nov 2006 14:43:41 -0800 (PST) Received: by 10.78.136.6 with HTTP; Thu, 2 Nov 2006 14:43:41 -0800 (PST) Message-ID: Date: Thu, 2 Nov 2006 16:43:41 -0600 From: "Aaron Bono" To: "Tom Lane" Subject: Re: The empty list? Cc: "Jesper Krogh" , pgsql-sql@postgresql.org In-Reply-To: <21991.1162506863@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8911_16054201.1162507421288" References: <454A654B.2000306@krogh.cc> <21991.1162506863@sss.pgh.pa.us> X-Google-Sender-Auth: 9c958106b0942a1b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/22 X-Sequence-Number: 26674 ------=_Part_8911_16054201.1162507421288 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/2/06, Tom Lane wrote: > > Jesper Krogh writes: > > Whereas this gives a syntax error: > > > # select 1 in (); > > ERROR: syntax error at or near ")" at character 14 > > LINE 1: select 1 in (); > > ^ > > I think the short answer why the spec disallows this (which it does) > is that it considers the right-hand side to be a table, and with > absolutely nothing there, there is no way to impute a rowtype to the > table. > > So if this syntax violates the specs then the ORM is the what needs to be change. The ORM should not attempt to do this. I have to use DB2 sometimes and it also does not allow empty (). What ORM are you using that is trying to do this? -- ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_8911_16054201.1162507421288 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/2/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Jesper Krogh <jesper@krogh.cc> writes:
> Whereas this gives a syntax error:

> # select 1 in ();
> ERROR:  syntax error at or near ")" at character 14
> LINE 1: select 1 in ();
>                      ^

I think the short answer why the spec disallows this (which it does)
is that it considers the right-hand side to be a table, and with
absolutely nothing there, there is no way to impute a rowtype to the
table.


So if this syntax violates the specs then the ORM is the what needs to be change.  The ORM should not attempt to do this.

I have to use DB2 sometimes and it also does not allow empty ().

What ORM are you using that is trying to do this?

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