From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | augie <augie(at)bravurasystems(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: plpgsql function parameter questions |
Date: | 2001-09-04 00:32:40 |
Message-ID: | 12842.999563560@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>> 1. what version of pg do i need to go to in order to eliminate the '16
>> parameter maximum' restraint?
Build your own version with a suitable value of FUNC_MAX_ARGS (a/k/a
INDEX_MAX_KEYS) in src/include/config.h.
>> 2. can i pass an array of integers to a function? can i return an array of
>> integers? if so, what would the function definition look like?
test71=# create function foo (integer[]) returns integer[] as '
test71'# begin
test71'# return $1;
test71'# end;' language 'plpgsql';
CREATE
test71=# select foo('{1,2,3}');
foo
---------
{1,2,3}
(1 row)
Actually doing any serious manipulation of an array in plpgsql might be
tricky, however. In particular, I don't see any simple way to construct
an array value from scratch. You might have better luck with pltcl.
There are examples of array-value manipulation in pltcl's self-test, IIRC.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert J. Sanford, Jr. | 2001-09-04 01:01:39 | Re: [WAY OT] Re: PL/java? |
Previous Message | Karen Ellrick | 2001-09-04 00:31:10 | Re: Questions about unicode. |