Thread: BUG #1832: Can't create function in plpgsql which has more than 10 parameters

BUG #1832: Can't create function in plpgsql which has more than 10 parameters

From
"Bohdan Linda"
Date:
The following bug has been logged online:

Bug reference:      1832
Logged by:          Bohdan Linda
Email address:      bohdan.linda@seznam.cz
PostgreSQL version: 7.3.4
Operating system:   Solaris
Description:        Can't create function in plpgsql which has more than 10
parameters
Details:

I have found if I will create functions as:
CREATE OR REPLACE FUNCTION addSyslog (
    VARCHAR
   ,VARCHAR(50)
   ,INET
   ,TIMESTAMP
   ,VARCHAR(255)
   ,NUMERIC(5)
   ,NUMERIC
   ,INET
   ,INTEGER
   ,INET
   ,INTEGER
) RETURNS INTEGER AS '
 DECLARE
 BEGIN
   RETURN 1;
 END
' LANGUAGE 'plpgsql';

and I will try to call:
SELECT
addSyslog('StrA','Strb','100.100.100.100','2005-08-17
12:24:37.545024','aaaaa log
message',555,87923463,'192.168.0.1',0,'192.168.0.2',0);

I will get:
WARNING:  plpgsql: ERROR during compile of addsyslog near line 3
ERROR:  syntax error at or near ","

But if I call:
SELECT
addSyslog('StrA','Strb','100.100.100.100','2005-08-17
12:24:37.545024','aaaaa log
message',555,87923463,'192.168.0.1',0,'192.168.0.2');

everything goes well.  I shall be able to pass more than 10 parameters.
"Bohdan Linda" <bohdan.linda@seznam.cz> writes:
> Description:        Can't create function in plpgsql which has more than 10
> parameters

Your example works fine for me.  Maybe something broken about your local
copy of Postgres?

            regards, tom lane