Re: ALTER EXTENSION ... UPGRADE;

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER EXTENSION ... UPGRADE;
Date: 2010-12-10 22:35:59
Message-ID: 4275DF33-8CC1-4244-A75A-85BEABC1DF54@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec 10, 2010, at 2:32 PM, Dimitri Fontaine wrote:

> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>> On Dec 10, 2010, at 1:50 PM, Dimitri Fontaine wrote:
>>> I don't think we can safely design around one part version numbers here,
>>> because I'm yet to see that happening in any extension I've had my hands
>>> on, which means a few already, as you can imagine.
>>
>> Why not? Simplest thing, to my mind, is to have
>>
>> upgrade/foo-1.12.sql
>> upgrade/foo-1.13.sql
>> upgrade/foo-1.15.sql
>
> Since when is 1.12 a one part version number? :)

What difference does it make how many parts there are? If it's a naming convention, you just match /$extension-(.+?)\.sql$/. Simple.

>> Since you know the existing version number, you just run all that come
>> after. For example, if the current version is 1.12, then you know to
>> run foo-1.13.sql and foo-1.15.sql.
>
> I don't think imposing what version numbers must look like and what the
> separators in the file names should be is a good idea.

The version numbers can be anything, so long as there *are* version numbers. And the rest of the file name should be just like the extension.

> It's just moving the complexity from the rules for the user to obey to
> having them explain us by which rules they're playing. I personally very
> much prefer the later, as you can imagine.

You keep making extension authors have to do more work. I keep trying to make it so they can do less. We want the barrier to be as low as possible, which means a lot of DRY. Make it *possible* to do more complicated things, but don't *require* it.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-12-10 22:40:07 Re: ALTER EXTENSION ... UPGRADE;
Previous Message Tom Lane 2010-12-10 22:35:50 pgsql: Use symbolic names not octal constants for file permission flags