Itagaki Takahiro <itagaki.takah...@gmail.com> writes: > * "relocatable" and "schema" seems to be duplicated options.
They are not, really. If you have a relocatable extension, then there's no schema option in the control file (setting it is an ERROR). If you have a non-relocatable extension, then you can either setup the schema to force it as the extension's author (or distributor / packager), or leave it alone and use the @extschema@ facility instead. > * "version" field in pg_available_extension might mislead when > a newer version of an extension is available but an older version > is installed. How about returning installed version for "installed" > field instead of booleans? The field will be NULLs if not installed. Good idea, I've done that in the pg_available_extension system view. > * I want to remove O(n^2) behavior in pg_extensions(). It scans > pg_extension catalog to return whether the extension is installed, > but it would be better to change the function to return just whole > extensions and JOIN with pg_extension in pg_available_extensions. > (it's the same technique used in pg_stat_replication) Well, that allows to get rid of the whole extension's listing internal function. Less code is good :) Here's the new system's view: http://pgsql.tapoueh.org/extensions/doc/html/view-pg-available-extensions.html CREATE VIEW pg_available_extensions AS SELECT n.nspname as "schema", E.name, X.extversion as "installed", E.version, E.relocatable, E.comment FROM pg_available_extensions() AS E LEFT JOIN pg_extension as X ON E.name = X.extname LEFT JOIN pg_namespace as N on N.oid = X.extnamespace; The new code (and documentation) is published in the git repository, I'm waiting a little bit more before (for your comments) to prepare the patch v30, or just tell me and I'll do that. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers