Обсуждение: Adapting existing extensions to use CREATE EXTENSION

Поиск
Список
Период
Сортировка

Adapting existing extensions to use CREATE EXTENSION

От
Roger Leigh
Дата:
Hi folks,

I've been looking at converting my existing "debversion" datatype
extension to use the proper "CREATE EXTENSION" facility for 9.1,
while also being backward compatible with 8.4 and 9.0.

My initial work on the conversion is here:
http://people.debian.org/~rleigh/postgresql-debversion_1.0.5.orig.tar.gz

(this is based upon looking at how citext handles it plus the
documentation and information at pgxn.org)

Note that it uses autoconf/make rather than relying on PGXS.
Extension support is disabled with --disable-extension.  When
disabled, it still installs a compatibility script in
contrib/ to allow existing scripts to function (but it just
wraps CREATE EXTENSION rather than doing everything by hand).

I was wondering if anyone could possibly look it over to see if
I'm missing anything, or doing anything stupid that I shouldn't
in the new order of things.  I'll release it and make it available
on PGXN once I'm happy it's OK.


Many thanks,
Roger

--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Вложения

Re: Adapting existing extensions to use CREATE EXTENSION

От
Dimitri Fontaine
Дата:
Hi,

Roger Leigh <rleigh@codelibre.net> writes:
> I've been looking at converting my existing "debversion" datatype
> extension to use the proper "CREATE EXTENSION" facility for 9.1,
> while also being backward compatible with 8.4 and 9.0.

I've been doing the same exercise with pgfincore recently, and will
probably do some more of it later.  You can look at those links for the
time being:

  http://tapoueh.org/blog/2011/06/29-multi-version-support-for-extensions.html
  https://github.com/klando/pgfincore/tree/master/debian
  http://packages.debian.org/sid/postgresql-9.0-pgfincore

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

Re: Adapting existing extensions to use CREATE EXTENSION

От
Roger Leigh
Дата:
On Mon, Aug 15, 2011 at 08:41:06PM +0200, Dimitri Fontaine wrote:
> Hi,
>
> Roger Leigh <rleigh@codelibre.net> writes:
> > I've been looking at converting my existing "debversion" datatype
> > extension to use the proper "CREATE EXTENSION" facility for 9.1,
> > while also being backward compatible with 8.4 and 9.0.
>
> I've been doing the same exercise with pgfincore recently, and will
> probably do some more of it later.  You can look at those links for the
> time being:
>
>   http://tapoueh.org/blog/2011/06/29-multi-version-support-for-extensions.html
>   https://github.com/klando/pgfincore/tree/master/debian
>   http://packages.debian.org/sid/postgresql-9.0-pgfincore

Thanks, I've taken a look.

I did get everything working eventually--it's now available on
http://pgxn.org/dist/debversion/
Not yet available in Debian due to dropping 8.4 compatibility;
it'll go in once 9.1 is in unstable.


Regards,
Roger

--
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Вложения