X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF5075376E; Mon, 11 Apr 2005 07:07:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54656-06; Mon, 11 Apr 2005 10:07:23 +0000 (GMT) Received: from mx5.net.nih.gov (mailfwd.nih.gov [165.112.130.36]) by svr1.postgresql.org (Postfix) with ESMTP id 1B50953536; Mon, 11 Apr 2005 07:07:22 -0300 (ADT) Received: from mx5.net.nih.gov (localhost [127.0.0.1]) by mx5.net.nih.gov (8.12.10/8.11.6) with ESMTP id j3BA7Paq003446; Mon, 11 Apr 2005 06:07:25 -0400 Received: from [128.231.145.14] (holmes.nhgri.nih.gov [128.231.145.14]) by mx5.net.nih.gov (8.12.10/8.11.6) with ESMTP id j3BA7PKd003443; Mon, 11 Apr 2005 06:07:25 -0400 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <5ad7366b9228273de19f4173aa30c2ba@mail.nih.gov> Content-Transfer-Encoding: 7bit Cc: pgsql-general@postgresql.org, pgsql-sql@postgresql.org From: Sean Davis Subject: Re: [SQL] Problems with Set Returning Functions (SRFs) Date: Mon, 11 Apr 2005 06:07:24 -0400 To: "Otto Blomqvist" X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/485 X-Sequence-Number: 76398 On Apr 6, 2005, at 2:53 PM, Otto Blomqvist wrote: > > secom=# select f1, f2, f3 from testpassbyval(1, (Select number1 from > test)); > ERROR: more than one row returned by a subquery used as an expression > > This is where I fail. Am I even on the right path here ? Writing the > actual > parsing function will be easy once I have a working concept. > How about (untested): select f1, f2, f3 from ( select testpassbyval(1,( select number1 from test) ) ) a; Sean