X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C9E4B528B7 for ; Sat, 4 Jun 2005 13:19:51 -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 90795-08 for ; Sat, 4 Jun 2005 16:19:43 +0000 (GMT) Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51]) by svr1.postgresql.org (Postfix) with ESMTP id CD0BF528B1 for ; Sat, 4 Jun 2005 13:19:41 -0300 (ADT) Received: from localhost (172.16.1.84) by smtp1.libero.it (7.0.027-DD01) id 41BDB2AB0265B2F7; Sat, 4 Jun 2005 18:19:33 +0200 Received: from localhost.localdomain (151.42.84.89) by smtp3.libero.it (7.0.027-DD01) id 428B7FF40077437F; Sat, 4 Jun 2005 18:19:36 +0200 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 6160D345E0; Sat, 4 Jun 2005 18:19:35 +0200 (CEST) Subject: Re: Multiple SRF parameters from query From: Federico Pedemonte To: pgsql-sql@postgresql.org In-Reply-To: <02767D4600E59A4487233B23AEF5C59922C2B7@blrmail1.aus.pervasive.com> References: <02767D4600E59A4487233B23AEF5C59922C2B7@blrmail1.aus.pervasive.com> Content-Type: text/plain Date: Sat, 04 Jun 2005 18:19:35 +0200 Message-Id: <1117901975.4210.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at libero.it serv5 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.82 tagged_above=0 required=5 tests=DNS_FROM_AHBL_RHSBL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST X-Spam-Level: * X-Archive-Number: 200506/58 X-Sequence-Number: 21659 On Wed, 2005-06-01 at 10:29 +0530, Ramakrishnan Muralidharan wrote: > Hi, > > I am not able to understand "Returning only one row", since 'aaa' having 2 rows and 'bbb' having 3 rows and what criteria single row should be returned. Please let me know the expected result and I will try to find out a solution for it. Sorry, it was not clear from my message. I meant that I had success creating a table as a result of multiple invocation of foo (parameter) using the result of an "outer" query as list of parameter to foo, only if foo () is a "normal" function, returning a simple value. It was a misleading sentence anyway, since what i'm asking help for is the case where foo () is a SRF and returns more than 1 row. What i'm trying to do is a query where i get a result of this kind a | b | c --+---+--- 1 | 2 | 3 5 | 9 | 1 4 | 0 | 0 2 | 0 | 0 0 | 0 | 0 given that i select from the table Anagrafica the fields 'aaa' and 'bbb', where the first 2 rows obtained as the result of foo ('aaa') and the latter 3 as the result of foo ('bbb'). Thanks a lot for help ! PS: Sorry for late answering, i had problems with mail. Regards, Federico.