Skip site navigation (1) Skip section navigation (2)

Re: Extension Packaging

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Kreen <markokr(at)gmail(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extension Packaging
Date: 2011-04-28 14:29:38
Message-ID: BANLkTikLk0FBpUYGPAuMW7L+xWcuyq42SQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Apr 28, 2011 at 3:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> writes:
>> On Thu, Apr 28, 2011 at 2:21 PM, Marko Kreen <markokr(at)gmail(dot)com> wrote:
>>> How about each .so containing a version callback?
>>>
>>> Thus you can show what is the version of underlying implementation
>>> without needing to mess with catalogs just to keep track of patchlevel
>>> of C code.
>
>> On this line, it would be easier to add a parameter "revision" to the
>> control file and have a function pg_revision(ext) to return it,
>> eventually showing in the \dx output.
>
> I think what we're discussing here is bug-fix revisions that don't
> affect the SQL declarations for the extension.  Presumably, that means a
> change in the C code, so the shared library is the right place to keep
> the revision number.  A version number in the control file seems to
> carry a nontrivial risk of being out of sync with the actual code in the
> shared library.

There is also the case of extensions whose data file matter: for
instance I've packaged the Italian text search dictionary as an
extension (http://pgxn.org/dist/italian_fts/): it contains no .so but
it may happen for the dictionary files to be changed. Its version is
1.2 and will stay so as long as the sql doesn't change, but its
revision is currently 1.2.1 and may bump to 1.2.2 should the dict
content change. For this extension, just spotting the 1.2.1 in the \dx
output would be more than enough, I don't see any use for the revision
number returned in an api call.

As long as the extension is installed via "make install" the .control
shouldn't drift away from the extension files it represents.

-- Daniele

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-04-28 15:19:19
Subject: Re: TEXT vs PG_NODE_TREE in system columns (cross column and expression statistics patch)
Previous:From: Tom LaneDate: 2011-04-28 14:07:31
Subject: Re: unknown conversion %m

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group