Re: Extension Packaging - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Extension Packaging
Date
Msg-id F934F897-52A1-40E4-BECB-6BC30965DC59@kineticode.com
Whole thread Raw
In response to Re: Extension Packaging  (Peter van Hardenberg <pvh@pvh.ca>)
List pgsql-hackers
On May 17, 2011, at 9:44 AM, Peter van Hardenberg wrote:

> My apologies for wading in out of the blue here as a first time poster with big demands, but allow me to briefly
statemy hopes without trying to be too proscriptive about particular mechanisms.  

You are not alone, I assure you. :-)

> My hope here is that the extension model should eventually enable me to offer the ability for non-superuser databases
tospecify by some mechanism the extensions that they require in a reproducible fashion, enabling my users to recreate
theirlocal development conditions on a production cluster. 

Yeah. Right now I believe this can only be done for extension that don't require a super user. And IIRC, all C-based
extensionsrequire a super user. 

> My particular worry, and I apologize if I have misunderstood the thrust of this thread, is that "extension version"
mightnot be tied to the "extension revision", and so I will not be able to determine whether or not all existing
extensionsare already at a specific version. 

Well, nothing has happened in that regard. It's too late for 9.1, and there wasn't consensus, anyway. So right now, the
installedextension version is the installed extension version. There is, however, no indication of any meaning or order
toversions. They're just strings of text. 

> The precision of this process is very important to me. My intended use case for this feature is to allow users to
specifythe versions of extensions that they need in some kind of a control file or in a database migration script such
thatthey can then install those extensions on various new systems in a reliable and reproducible way. 

This is do-able.

> David, if you do what you propose, haven't I already lost?

No. I was suggesting that there be some sort of function, pg_extension_version($ext_name), that would return the
versionand the revision. Combined they would equal the version you're interested in. I'm not thrilled with this
approach,though, and it's not there, so for now we have the wild west of versions.  

So for now, what you want (modulo permissions issues) is what's there, IIUC.

Best,

David



pgsql-hackers by date:

Previous
From: Peter van Hardenberg
Date:
Subject: Re: Extension Packaging
Next
From: Robert Haas
Date:
Subject: Re: DOMAINs and CASTs