Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7NJjcP88067 for ; Thu, 23 Aug 2001 15:45:38 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id PAA11147; Thu, 23 Aug 2001 15:45:25 -0400 (EDT) Date: Thu, 23 Aug 2001 15:45:25 -0400 (EDT) From: Alex Pilosov To: Tom Lane cc: pgsql-sql@postgresql.org Subject: Re: Function returning an array In-Reply-To: <5905.998586437@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200108/296 X-Sequence-Number: 4542 On Thu, 23 Aug 2001, Tom Lane wrote: > "Josh Berkus" writes: > >> What's the correct syntax to return two VARCHAR(255)? > > > There isn't one. At this time, functions cannot return arrays. > > Well, they *can*, it's just that there's no syntax to support > constructing an array value in SQL or plpgsql languages. Most importantly, there's no syntax to support deconstructing an array ;) I have patches to support "select * from function(args)" almost done, I just need to perform merge against -current. But unfortunately RL took most of my time and I was unable to work on pg-related things for last months. The patches contain quite a lot of changes to core structures (RangeTblEntry and others) and I want to get them in before 7.2 gets frozen. Hopefully this weekend I'll have some time to do merge and cleanup.... Also included in the patch is ability to do 'select * from cursor foo'. -alex