Re: [HACKERS] Changing oidvector length

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To:
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Changing oidvector length
Date: 2000-01-11 00:52:46
Message-ID: 7558.947551966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-01-11 01:25:14 Re: [HACKERS] Changing oidvector length
Previous Message Tom Lane 2000-01-11 00:35:57 Re: [HACKERS] Changing oidvector length