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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bohdan Linda

The following bug has been logged online:

Bug reference:      1832
Logged by:          Bohdan Linda
Email address:      [hidden email]
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.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Reply | Threaded
Open this post in threaded view
|

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

Tom Lane-2
"Bohdan Linda" <[hidden email]> 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster