From: Roland Roberts <roland@astrofoto.org>
To: pgsql-sql@postgresql.org
Subject: Re: Passing array to PL/SQL and looping
Date: 28 Sep 2002 20:27:37 -0400
Message-ID: <m265wpljwm.fsf@kuiper.rlent.pnet> (raw)
In-Reply-To: <1033140741.4254.12.camel@watto.interprose.net>
References: <1CAD483B723BD611B0C10090274FF068554860@NXCDMAIL>
<200209261820.08106.josh@agliodbs.com>
<1033140741.4254.12.camel@watto.interprose.net>
>>>>> "Greg" == Greg Johnson <gregj@interprose.com> writes:
Greg> CREATE FUNCTION test_array( ) RETURNS VARCHAR[] AS '
Greg> DECLARE
Greg> return_array VARCHAR[];
Greg> BEGIN
Greg> return_array[0] := ''test'';
Greg> return_array[1] := ''test 1'';
Greg> return_array[2] := ''test 2'';
Greg> RETURN (return_array);
Greg> END;'
Greg> LANGUAGE 'plpgsql';
Greg> I get the following error when I try to run it:
Greg> ERROR: parse error at or near "[" on line 4.
I raised this issue when dealing with version 7.1 and the conclusion
was that PL/PgSQL doesn't understand array syntax. If you construct
the array as { val, val, val, ... } it works, but that is not a
practical solution for most uses.
What can we do to at least get this on the radar screen as a known
bug?
roland
--
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland@rlenter.com 76-15 113th Street, Apt 3B
roland@astrofoto.org Forest Hills, NY 11375
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: roland@astrofoto.org
Subject: Re: Passing array to PL/SQL and looping
In-Reply-To: <m265wpljwm.fsf@kuiper.rlent.pnet>
* 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