Re: [HACKERS] Re: Number of parameters in a sql function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Re: Number of parameters in a sql function
Date
Msg-id 2462.926271605@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: Number of parameters in a sql function  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> Looks like this was fixed, because we now generate an error:
> test=> create function klasd (int, int, int, int, int, int, int, int,
> int) returns int as 'asdf' language 'c';
> ERROR:  Procedures cannot take more than 8 arguments

I'm not sure if this is a sufficient defense or not --- IIRC, there were
places in the parser that stuffed info into size-8 arrays without any
nearby check that no more than 8 items would be forthcoming.  Offhand
the obvious try doesn't crash it:

regression=> select foo(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
ERROR:  No such function 'foo' with the specified attributes

but I am hoping to go back and look more carefully.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Oops, I seem to have changed UNION's behavior
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Problem with complex query