Re: [SQL] Function returning an array

2001-08-23 Thread Alex Pilosov
On Thu, 23 Aug 2001, Tom Lane wrote: > "Josh Berkus" <[EMAIL PROTECTED]> 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 a

Re: [SQL] Function returning an array

2001-08-23 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> 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

Re: [SQL] Function returning an array

2001-08-23 Thread Josh Berkus
Ciao Francesco: > What's the correct syntax to return two VARCHAR(255)? There isn't one. At this time, functions cannot return arrays. Look for a fix to this limitation with version 7.2 or later. Jan Wieck and others have been working to extend functions so that they may manipulate and retur

[SQL] Function returning an array

2001-08-23 Thread Francesco Casadei
I want a function to return an array of two VARCHAR(255). This works, but does not return VARCHAR(255): CREATE FUNCTION ins_div(CHAR(8)) RETURNS _varchar AS '...' LANGUAGE 'plpgsql'; These don't work: CREATE FUNCTION ins_div(CHAR(8)) RETURNS _varchar(255) AS '...' LANGUAGE 'plpgsql'; CREATE FUN