Bruce Momjian <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to