Re: Extension upgrade, patch v0: debug help needed - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Extension upgrade, patch v0: debug help needed
Date
Msg-id 63475B7A-944F-4C8E-BE73-7BD928D4F381@kineticode.com
Whole thread Raw
In response to Extension upgrade, patch v0: debug help needed  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Extension upgrade, patch v0: debug help needed
List pgsql-hackers
On Jan 1, 2011, at 2:30 PM, Dimitri Fontaine wrote:

> To support that is quite simple in fact, as the following commands will
> do the trick:
>
>  CREATE WRAPPER EXTENSION ...;        -- don't run the script
>  ALTER OBJECT ... SET EXTENSION ...;  -- that's in the upgrade script
>  ALTER EXTENSION ... UPGRADE;         -- as "usual"

I rather doubt that "WRAPPER" will be accepted as a reserved word in the grammar.

> Here's an example:
>
> dim=# \i ~/pgsql/exts/share/contrib/lo.sql
> CREATE DOMAIN
> CREATE FUNCTION
> CREATE FUNCTION
>
> dim=# create wrapper extension lo;
> CREATE EXTENSION

What happened to your UPGRADE from NULL idea?

> The WRAPPER keyword meaning is that we're only creating the catalog
> entry, forcing version to NULL and not running the extension's script.
> This keyword looked like the best choice from existing ones in our
> grammar, please feel free to pick any other phrase here.

I don't see why it's necessary at all.

Best,

David



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
Next
From: Tom Lane
Date:
Subject: Re: pg_dump --split patch