Re: Passing array to PL/SQL and looping
| От | Roland Roberts |
|---|---|
| Тема | Re: Passing array to PL/SQL and looping |
| Дата | |
| Msg-id | m265wpljwm.fsf@kuiper.rlent.pnet обсуждение исходный текст |
| Ответ на | Re: Passing array to PL/SQL and looping (Greg Johnson <gregj@interprose.com>) |
| Ответы |
Re: Passing array to PL/SQL and looping
|
| Список | pgsql-sql |
>>>>> "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
В списке pgsql-sql по дате отправления: