From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | imageguy <imageguy1206(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Number or parameters for functions - limited to 32 ? |
Date: | 2008-04-08 15:43:24 |
Message-ID: | 47FB929C.8060601@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
imageguy wrote:
> I am attempting to port and application that was designed for MS-SQL
> to Postgres and bumped into a limitation of pg functions, namely that
> pg functions can only support 32 parameters.
I thought it had been increased to 64, but I'm sure you're right.
> Our app takes records from a only cobol file(s) and populates an SQL
> table(s), such that one table in the db = one file from the file
> system.
>
> With MS-SQL we use a stored procedure to handle the update/inserts and
> pass the fields information as parameters to the procedure as part of
> "EXECUTE" command. Sometimes there can be as many as 50+ parameters
> to be passed.
Ah, but it's a record, so pass a record type in:
CREATE TYPE cobol_file_type AS (a integer, b text, c varchar, d date);
CREATE FUNCTION build_tables1(c cobol_file_type)...
Each existing table has its own type defined too (with the same name),
which might save you some time.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Kev | 2008-04-08 15:47:54 | Re: plperlu and perl 5.10 |
Previous Message | Richard Huxton | 2008-04-08 15:40:27 | Re: Problem after VACUUM ANALYZE |