Re: function returning array

From: Joe Conway <mail(at)joeconway(dot)com>
To: Dennis <pg-user(at)calico-consulting(dot)com>
Cc: postgres SQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: function returning array
Date: 2004-04-14 04:10:15
Message-ID: 407CB9A7.4010101@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Charity M 2004-04-14 13:57:05 Database triggers
Previous Message Tom Lane 2004-04-14 03:30:47 Re: function returning array