Search Postgresql Archives

Re: Number or parameters for functions - limited to 32 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just a FYI, you can get around the 32 param limit in older versions of postgresql by passing the function a varchar/text array, then use the built in array functions to pull the "params" from the passed array.

Something like this(not tested code, just a sample):

CREATE or REPLACE FUNCTION test_func(varchar)
RETURNS void AS
$BODY$
DECLARE
IN_ARRAY text[] ;
ACCOUNTNUMBER_IN        varchar;
BEGIN

IN_ARRAY = string_to_array($1,'~^~');  --use a unique delimiter

ACCOUNTNUMBER_IN  = IN_ARRAY[1];

return;
END
$BODY$
LANGUAGE 'plpgsql' VOLATILE;


Later,

Tony Caduto
AM Software Design
Home of Lightning Admin for PostgreSQL and MySQL
http://www.amsoftwaredesign.com




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux