Re: Extension Packaging

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, Marko Kreen <markokr(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: Re: Extension Packaging
Date: 2011-05-12 03:53:55
Message-ID: BANLkTinFX4c358jBn3eYsT+r1bjmaEywgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 11, 2011 at 10:48 PM, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On May 11, 2011, at 2:47 PM, Robert Haas wrote:
>
>>> Okay, how we add a "revision" key to the control file and extrevision to the pg_extension catalog. Its type can be "TEXT" and is optional for use by extensions.
>>>
>>> This would allow extension authors to identify the base version of an extension but also the revision. And the core doesn't have to care how it works or if it's used, but it would allow users to know exactly what they have installed.
>>>
>>> Thoughts?
>>
>> How would pg_extension.extrevision be kept up to date?  AFAICS, the
>> whole point is that you might swap out the shared libraries without
>> doing anything at the SQL level.
>
> Bah! Okay, I give up. I'll not worry about it right now, as I have only one C extension outside of core and it won't change much in the code. And I'll just keep using the full version string (x.y.z) for the upgrade scripts. What I won't do is change that version with every release, unless there is a code change to demand it. The distribution version can increment independently.

What might work is to have the view call some function
pg_get_the_revision_from_the_control_file_or_some_other_place_in_the_filesystem('extension-name').

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-05-12 05:22:36 Re: pg_upgrade and PGPORT
Previous Message David E. Wheeler 2011-05-12 02:48:35 Re: Extension Packaging