From: Joe Conway <mail@joeconway.com>
To: Dennis <pg-user@calico-consulting.com>
Cc: postgres SQL <pgsql-sql@postgresql.org>
Subject: Re: function returning array
Date: Tue, 13 Apr 2004 21:10:15 -0700
Message-ID: <407CB9A7.4010101@joeconway.com> (raw)
In-Reply-To: <courier.407C6CB0.00005135@wolverine.lercnetworks.com>
References: <courier.407C6CB0.00005135@wolverine.lercnetworks.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mail@joeconway.com, pg-user@calico-consulting.com
Subject: Re: function returning array
In-Reply-To: <407CB9A7.4010101@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox