Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The reason I ask is that there are some parts of the code that try to
> find the number of args by looking for the _first_ non-zero entry in the
> list.
Where? This is certainly broken for anything that needs to deal with
an arbitrary pg_proc entry, but it might be OK in limited contexts.
Also, if you are thinking of stuff that looks at *index* definitions
rather than *function* definitions, I think it's OK.
> I changed those to look for the _last_ non-zero entry, but it
> sounds like that is still wrong.
I'm dubious about changing something like that without fairly close
investigation and/or a known bug to fix. If those bits of code are
wrong, they were wrong before the FUNC_MAX_ARGS change ... and if
they weren't wrong, maybe they are now.
regards, tom lane