Re: extension facility (was: revised hstore patch) - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: extension facility (was: revised hstore patch)
Date
Msg-id 87eis7bowh.fsf@hi-media-techno.com
Whole thread Raw
In response to Re: extension facility (was: revised hstore patch)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Jul 23, 2009, at 2:44 AM, "David E. Wheeler" <david@kineticode.com>
> wrote:
>>
>> Well, it depends. If there could be some sort of defined interface for
>> pg_migrator could call to migrate any data type (this issue  applies
>> mainly to types, yes?), then an extension author just needs  to implement
>> that interface. No?
>
> Yes... but "if" and "just" can paper over a good deal of complexity, and
> it's not clear to me that there's any compensating advantage.

Well there's already an API for this in the extension design:
 create extension foo    ...   upgrade function upgrade_foo(old version, new version)

So pg_migrator would have to look on previous cluster for which version
of the module was there and on the new cluster which is installed, and
run the function accordingly...

All the burden is then on the extension's author.

Regards,
-- 
dim


pgsql-hackers by date:

Previous
From: Laurent Laborde
Date:
Subject: Re: Higher TOAST compression.
Next
From: mahendra chavan
Date:
Subject: query decorrelation in postgres