X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id A2E83926104 for ; Sun, 1 Jun 2003 01:33:09 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 30732-09 for ; Sun, 1 Jun 2003 01:32:57 -0400 (EDT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by developer.postgresql.org (Postfix) with ESMTP id E68039260FF for ; Sun, 1 Jun 2003 01:32:56 -0400 (EDT) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 1768935; Sat, 31 May 2003 22:08:58 -0700 Message-ID: <3ED98F60.3070503@joeconway.com> Date: Sat, 31 May 2003 22:30:08 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Danny Su Cc: pgsql-sql@postgresql.org Subject: Re: generic return for functions References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200306/3 X-Sequence-Number: 13761 Danny Su wrote: > I am currently converting everything from SQL Server to PostgreSQL. > This is for an application that is going to support Oracle, SQL Server > and PostgreSQL at the same time. I have done a lot of the conversion > already but I am stuck on functions that returns parts of views or tables. > [...snip description of SQL Server 2000 table-valued UDFs...] > > I know "returns setof record" and "returns setof my_own_datatype" work, > but I would like to know if there is a better way? Something that's like > "returns setof record" but without having to define all the columns when > I call the function? {i.e. without the need to do: select * from > myfunction() as (column1 type1, column2...);} > > If there is such method? It will allow me to maintain the application > much easier and makes the conversion task much easier :) > Sorry -- the answer is no. But I don't think Oracle will support what you want either. Joe