Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)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:
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.
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
In response to
pgsql-hackers by date
|Next:||From: Naoya Anzai||Date: 2011-01-31 11:42:31|
|Subject: BUG #5856: pg_attribute.attinhcount is not correct.|
|Previous:||From: Pavel Stehule||Date: 2011-01-31 09:34:50|
|Subject: Re: [pgsql-general 2011-1-21:] Are there any projects
interested in object functionality? (+ rule bases)|