Re: [HACKERS] Changing oidvector length - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Changing oidvector length
Date
Msg-id 7558.947551966@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Changing oidvector length  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Changing oidvector length
List pgsql-hackers
You have:

#define FUNC_MAX_ARGS           (INDEX_MAX_KEYS+1)

This is WRONG, I'm pretty sure --- FUNC_MAX_ARGS should be the same
as the length of oidvector.

User-declared functions can definitely only have as many args as there
are slots in oidvector, because that's all the room there is to declare
them in pg_proc.

You may have gotten confused because fmgr.c allowed 9 args to be passed,
even though there's no way to declare such a function; I think this was
a hack to support some special system usage --- possibly selectivity
estimators had 9 args at one time.  (They don't now, so the 9th-arg
support was dead code as far as I can tell.)  But if we are going to
increase the default MAX_ARGS above 8 then the issue goes away anyway,
and there's no need for fmgr.c to support more args than can normally
be declared.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Changing oidvector length
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Changing oidvector length