Alvaro Herrera <alvhe...@commandprompt.com> writes: > Excerpts from Tom Lane's message of mié nov 17 12:20:06 -0300 2010: >> What's the point of the InvalidOid check?
> If the check is not there, the calling query will have to prevent the > function from being called on rows having OID=0 in pg_depend. (These > rows show up in the catalog for pinned objects). Hmm. It would be good to document that motivation somewhere. Also, for my own taste it would be better to do /* for "pinned" items in pg_depend, return null */ if (!OidIsValid(catalogId)) PG_RETURN_NULL(); ... straight line code here ... rather than leave the reader wondering whether there are any other cases where the function is intended to return null. Oh, one other gripe: probably better to name it pg_describe_object. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers