Re: create function: number of parameters - Mailing list pgsql-general

From Ralph Graulich
Subject Re: create function: number of parameters
Date
Msg-id Pine.LNX.4.21.0207160103050.11301-100000@shauny.shauny.de
Whole thread Raw
In response to Re: create function: number of parameters  (nconway@klamath.dyndns.org (Neil Conway))
List pgsql-general
Hi Neil,


> You can edit FUNC_MAX_ARGS in src/include/pg_config.h, recompile and
> re-initdb.

Being a rather simple task I just edited the header file as you described,
recompiled and installed postgreSQL 7.2.1. For testing, if raising the
limit works at all, I created a dummy function:

CREATE OR REPLACE FUNCTION
  create_customer(
  INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR,
  INTEGER, VARCHAR, VARCHAR, INTEGER, INTEGER,
  INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR,
  VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR,
  VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR,
  VARCHAR, VARCHAR, VARCHAR, VARCHAR)
  RETURNS INTEGER AS '
BEGIN
  RETURN 1;
END;
' LANGUAGE 'plpgsql'

I used the function by calling:

SELECT create_customer(
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL);

Seems to work as it returns 1 (1 row). So I will step further into it and
assemble the code for the function body now and check thoroughly wether
all the parameters get handled oorrectly.

Thanks for your immediate and accurate assistance!


Kind regards
... Ralph ...



pgsql-general by date:

Previous
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: Re: create function: number of parameters
Next
From: Martijn van Oosterhout
Date:
Subject: Re: table size growing out of control