From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: ALTER EXTENSION UPGRADE, v3 |
Date: | 2011-02-11 09:44:32 |
Message-ID: | 87sjvukirj.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> First off, I don't much care for the name "CREATE WRAPPER EXTENSION".
> WRAPPER is a misnomer in this case --- it's not wrapping anything.
> I think Dimitri stated that he chose WRAPPER just because it was an
> already existing keyword, but that isn't much of an excuse.
Let's get rid of the two-stages idea now that we have proper VERSION
support in the commands, as seen in another email.
> Second, I don't like anything about the term "null version" for the
> case of bootstrapping from an old-style contrib module. Null implies
> unknown, which isn't what we've got here --- the upgrade script is going
Yes it's what we have, the way I see it at least. The version number
certainly exists, it's just that PostgreSQL had no way to know about it
until now. Certainly that concept can be called unknown…
> One minor objection to this idea is that "foo--1.0.sql" looks more like a
> typo than anything else. We could alternatively decide that the special
> reserved version name is '0', so that bootstrap script names look like
> "foo-0-1.0.sql". But if you don't want to have any built-in assumptions
> about what version names mean, you might not like that idea.
I hope you will like the version aliases proposal I've been making in
other emails, just saying it again as a loose cross-reference :)
> Third, I'm also not thrilled with the syntax "ALTER EXTENSION foo
> UPGRADE". UPGRADE isn't an existing keyword (note that VERSION is).
Fair enough.
> And I don't see any strong reason to assume that the version change
> is an "upgrade". Authors might well choose to support sidegrades or
> downgrades, especially with experimental modules. I suggest either
>
> ALTER EXTENSION foo UPDATE [ TO 'version' ]
>
> ALTER EXTENSION foo VERSION [ 'version' ]
>
> the main excuse for the latter being that it's closer to the comparable
> syntax in CREATE EXTENSION.
I somehow would prefer a mix of those two proposals:
ALTER EXTENSION foo TO VERSION 'version';
ALTER EXTENSION foo TO VERSION alias;
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Urbański | 2011-02-11 09:53:01 | Re: pl/python custom exceptions for SPI |
Previous Message | Vitalii Tymchyshyn | 2011-02-11 09:44:05 | Re: Why we don't want hints Was: Slow count(*) again... |