Usability tweaks for extension commands - Mailing list pgsql-hackers

From Tom Lane
Subject Usability tweaks for extension commands
Date
Msg-id 16871.1297819080@sss.pgh.pa.us
Whole thread Raw
Responses Re: Usability tweaks for extension commands  ("David E. Wheeler" <david@kineticode.com>)
Re: Usability tweaks for extension commands  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Currently, ALTER EXTENSION UPDATE throws an error if there's nothing to
do:

regression=# create extension adminpack ;
CREATE EXTENSION
regression=# alter extension adminpack update;
ERROR:  version to install or update to must be different from old version

On reflection it seems like this is overly paranoid, and it'd be more
useful if the ALTER just reported a NOTICE along the lines of "version
so-and-so is already installed".  Any objections?

Another thought is that it'd probably be useful for there to be a
"CREATE OR REPLACE EXTENSION" syntax, with the behavior of "install the
extension if it's not present, else make sure it's of the specified or
default version"; this behavior parallels CREATE OR REPLACE LANGUAGE
which is something we've been refining for awhile.  I am not however
entirely sure what to do with the SCHEMA option if the extension already
exists --- we might be able to do SET SCHEMA, but perhaps that's too
aggressive.

Thoughts?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: FOR KEY LOCK foreign keys
Next
From: Tom Lane
Date:
Subject: Re: updated patch for foreach stmt