X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0A715DAF7E for ; Wed, 26 Oct 2005 16:45:36 -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 62510-05 for ; Wed, 26 Oct 2005 19:45:33 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id D39A4D9CA3 for ; Wed, 26 Oct 2005 16:45:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9QJjXAW010932; Wed, 26 Oct 2005 15:45:34 -0400 (EDT) To: mario.splivalo@mobart.hr Cc: pgsql-sql@postgresql.org Subject: Re: RETURNS SETOF primitive returns results in parentheses In-reply-to: <1130355699.18653.0.camel@localhost.localdomain> References: <1130330322.7400.45.camel@ekim> <5954.1130337622@sss.pgh.pa.us> <1130355699.18653.0.camel@localhost.localdomain> Comments: In-reply-to Mario Splivalo message dated "Wed, 26 Oct 2005 21:41:39 +0200" Date: Wed, 26 Oct 2005 15:45:33 -0400 Message-ID: <10931.1130355933@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/345 X-Sequence-Number: 23198 Mario Splivalo writes: > Wo-ha, makes perfect sense. So, I'd go by with declaring the rec as > varchar, instead as of a record. Wich is what I should do in the first > place. Or just return the correct field out of it. RETURN NEXT returnValue.fieldname; I think you may have to do it this way because the FOR loop wants a record variable. regards, tom lane