Re: [HACKERS] Changing oidvector length

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Changing oidvector length
Дата
Msg-id 200001110125.UAA01288@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Changing oidvector length  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Changing oidvector length  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.


I was going to ask about that.  The original value for this was 9, while
oid8 was only 8 long.  When I went to 16, FUNC_MAX_ARGS has to 17 or
initdb fails on int4in.  No idea why, and want to ask if anyone knows
why this is required.  I know it should be 16, but I can't figure out
why it doesn't work at 16, only at 17.


> 
> 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

btbuild, I believe.

> 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.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Changing oidvector length
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Potential vacuum bug?