Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 27062C24694 for ; Fri, 30 Dec 2011 11:08:16 -0400 (AST) Received: from [76.14.161.106] (helo=newserver.jfcomputer.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rge47-0002aB-Hz for pgsql-sql@postgresql.org; Fri, 30 Dec 2011 15:08:15 +0000 Received: from localhost (unknown [127.0.0.1]) by newserver.jfcomputer.com (Postfix) with ESMTP id B7016121F4 for ; Fri, 30 Dec 2011 15:08:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at site Received: from newserver.jfcomputer.com ([127.0.0.1]) by localhost (linux-jfp8.site [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8rGq8c+VFbzP for ; Fri, 30 Dec 2011 07:08:02 -0800 (PST) Received: from linux-12.localnet (unknown [192.168.1.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: johnf@jfcomputer.com) by newserver.jfcomputer.com (Postfix) with ESMTPSA id 14FB0121F1 for ; Fri, 30 Dec 2011 07:08:02 -0800 (PST) From: John Fabiani To: pgsql-sql@postgresql.org Subject: Re: avoid the creating the type for setof Date: Fri, 30 Dec 2011 07:08:01 -0800 Message-ID: <3242358.vcvgTIkFkN@linux-12> User-Agent: KMail/4.7.2 (Linux/3.1.0-1.2-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: <1762087.ynHxkPSFx3@linux-12> References: <1762087.ynHxkPSFx3@linux-12> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Host-Lookup-Failed: Reverse DNS lookup failed for 76.14.161.106 (failed) X-Pg-Spam-Score: 1.6 (+) X-Archive-Number: 201112/100 X-Sequence-Number: 36161 On Friday, December 30, 2011 06:26:19 AM John Fabiani wrote: > Hi, > I recall somewhere I saw a simple plpgsql function that returned a table > with more than one record that did not use a defined type or a temp table ( > at least I think I did). Is it possible to create such a function that > will return more than one record and not require a record type or temp > table? > > something like > > return setof record as > return query select ... > > return > > > Johnf Thanks all - I knew I had seen it in the past. Johnf