>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
Tom> I thought about extending the extension infrastructure to provide Tom> some way of retrieving relevant OIDs. We could imagine, for Tom> instance, that an extension script has a way to say "this function Tom> is object number three within this extension", and while running Tom> the script we make a catalog entry showing that object number Tom> three has OID thus-and-so, and then that catalog entry can be Tom> consulted to get the right OID (by C code that has hard-wired Tom> knowledge that object number three is the function it cares Tom> about). This is still kind of messy, because aside from the Tom> hand-assigned object numbers you'd have to use the extension name Tom> as part of the lookup key, making the name into something the C Tom> code critically depends on. We don't have ALTER EXTENSION RENAME, Tom> so maybe that's okay, but it seems painful to say that we can Tom> never have it. I suggest using string tags rather than object numbers: 1. easier to read and maintain 2. an object might be given many tags, some of them automatically 3. it might make sense to provide a function that the extension can use to ask "is oid X one of my objects with tag 'foo'" (e.g. to match one of a set of related functions) in addition to looking up specific oids by tag -- Andrew (irc:RhodiumToad)