Re: function returning array - Mailing list pgsql-sql

From Joe Conway
Subject Re: function returning array
Date
Msg-id 407CB9A7.4010101@joeconway.com
Whole thread Raw
In response to function returning array  ("Dennis" <pg-user@calico-consulting.com>)
List pgsql-sql
Dennis wrote:

> I am trying to return an array from a function and don't seem to be 
> having luck. The function seems to work fine, but if I do assignment to 
> an array variable, I get null in the array elements
> DECLARE
>   results varchar[];
>   tmpv varchar;
> BEGIN
>   -- now call func that returns varchar[]
>   results := parseString(''abc,def,ghi'','','');
>   tmpv := results[1];
>   RAISE NOTICE '' tmpv = % '',tmpv;    -- tmpv will be null.
> 
> END;

How is parseString() defined? What Postgres version?

Joe



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: function returning array
Next
From: Christoph Haller
Date:
Subject: Re: Help with COPY command