Re: Function returning an array - Mailing list pgsql-sql

From Tom Lane
Subject Re: Function returning an array
Date
Msg-id 5905.998586437@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function returning an array  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Function returning an array  (Alex Pilosov <alex@pilosoft.com>)
List pgsql-sql
"Josh Berkus" <josh@agliodbs.com> 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


pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Function returning an array
Next
From: "Zot O'Connor"
Date:
Subject: Execute permsissions on fuctions