"Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > I see there are routines doing similar things but for functions and > others. I'm right in saying that OID isn't unique in a database > (necessarily) and so we couldn't have a general object_is_visible(oid) > function that did the appropiate from the type of object refered to?
Not in the current structure. Even if OID were guaranteed unique across the database, how would you determine which kind of object a given OID referred to? Seems like it would take expensive probing of a lot of different tables until you found a match --- which is a bit silly when the calling query generally knows darn well where it got the OID from. I suppose we could define an object_is_visible(tableoid, oid) function, but I'm not sure if it has any real usefulness. > It just seems that if we're interested in showing tables according to > visibility then shouldn't we be doing the same for these other things? Sure; if we go this routine then all five of the FooIsVisible routines will need to be exported as SQL functions. 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