dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1832: Can't create function in plpgsql which has more than 10 parameters in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bohdan Linda
 
Posts: n/a

Default [BUGS] BUG #1832: Can't create function in plpgsql which has more than 10 parameters - 08-18-2005 , 09:35 AM







The following bug has been logged online:

Bug reference: 1832
Logged by: Bohdan Linda
Email address: bohdan.linda (AT) seznam (DOT) 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.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1832: Can't create function in plpgsql which has more than 10 parameters - 08-18-2005 , 10:33 AM






"Bohdan Linda" <bohdan.linda (AT) seznam (DOT) cz> writes:
Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.