function returning array - Mailing list pgsql-sql

From Dennis
Subject function returning array
Date
Msg-id courier.407C6CB0.00005135@wolverine.lercnetworks.com
Whole thread Raw
Responses Re: function returning array  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: function returning array  (Joe Conway <mail@joeconway.com>)
List pgsql-sql
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];
RAISENOTICE '' tmpv = % '',tmpv;    -- tmpv will be null.
 

END; 

I found reference to this sort of thing not working, but the reference was 
from several years ago, so I'm not sure if that is still the case or if I am 
doing something wrong. 

Do I need to go with returning a set instead? 

Dennis S
pg-user@calico-consulting.com 




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: trigger/for key help
Next
From: Tom Lane
Date:
Subject: Re: function returning array