Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7NH7QP30566 for ; Thu, 23 Aug 2001 13:07:26 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id f7NH7HK05909; Thu, 23 Aug 2001 13:07:18 -0400 (EDT) To: "Josh Berkus" cc: Francesco Casadei , pgsql-sql@postgresql.org Subject: Re: Function returning an array In-reply-to: References: Comments: In-reply-to "Josh Berkus" message dated "Thu, 23 Aug 2001 08:44:37 -0700" Date: Thu, 23 Aug 2001 13:07:17 -0400 Message-ID: <5905.998586437@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200108/293 X-Sequence-Number: 4539 "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. I know that you can do it in pltcl (there are examples in the pltcl self-test), and of course you can do it in C. A brute-force solution is to make a support function in one of those languages that takes two varchars and returns an array of varchar. regards, tom lane