>> 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