On 12/31/15 16:13, Tom Lane wrote: >> I see that 9.5.0 already adds PGDLLIMPORT on the global variable >> creating_extension, but CurrentExtensionObject on the very next >> line of extension.h still doesn't have it. > > Why would you need to access that?
This returns to the earlier question about extensions whose purpose is to enable other extensions. I'm thinking a bit ahead. At the moment, I am only working on nudging PL/Java itself into the extension framework, so you can install *it* with CREATE EXTENSION. For that, I can get along without the extension Oid. Down the road, it would be quite natural for PL/Java users to develop functionality in Java, package it in a jar file, and want to install that using CREATE EXTENSION. So they'd distribute their foo.jar file with a foo.control file (requires = 'pljava'), and a very short foo--1.0.0.sql file SELECT sqlj.install_jar('file:foo.jar', 'foo', true); and most of the right stuff will automagically happen ... the associated system objects (created by the deployment script inside the jar, executed by install_jar) will be captured as extension members. But the jar itself, stashed by install_jar into a PL/Java managed table that can't participate in pg_depend, somehow still needs to be associated with the extension too. I suppose there really won't be a way to do this with reliability unless someday extensions can hook the dependency infrastructure, as you mentioned in passing in an earlier message. That sounds like a longer discussion. But I wondered if it might not be too hard to put PGDLLIMPORT on CurrentExtensionObject as a stopgap. ... though perhaps it doesn't matter that much, because I still have to write a circuitous workaround anyway, and keep it in the code until 9.1 through 9.4 all vanish from the earth. -Chap -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers