Re: Function call crashes server

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function call crashes server
Дата
Msg-id 10268.1016687335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Function call crashes server  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Function call crashes server  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> If I do this as any user:
>     SELECT update_pg_pwd();
> it crashes all backends and causes a server-wide restart.  Is this
> acceptable behavior?

There are a number of things we might blame this on, all having to do
with the overuse of type OID zero to mean too many different things.
But my attention is currently focused on this tidbit in ExecTypeFromTL:
           TupleDescInitEntry(typeInfo,                              resdom->resno,
resdom->resname,          /* fix for SELECT NULL ... */                              (restype ? restype : UNKNOWNOID),
                           resdom->restypmod,                              0,                              false);
 

Had ExecTypeFromTL rejected restype = 0 rather than substituting
UNKNOWNOID (a pretty durn random response, IMHO), we'd not see this
crash.

The "fix for SELECT NULL" appears to have been committed by you
on 7 Dec 1996.  Care to explain it?

(AFAICT, "SELECT NULL" does not produce a zero at this point now,
though perhaps it did in 1996.  Or was there some other case you
were defending against back then?)
        regards, tom lane


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

Предыдущее
От: nconway@klamath.dyndns.org (Neil Conway)
Дата:
Сообщение: Re: [GENERAL] Notify argument?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Function call crashes server