Re: ALTER EXTENSION UPGRADE, v3

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: ALTER EXTENSION UPGRADE, v3
Дата
Msg-id CE4056F4-5731-41E6-90F6-81FD2627394E@kineticode.com
обсуждение исходный текст
Ответ на Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ALTER EXTENSION UPGRADE, v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Feb 10, 2011, at 3:50 PM, Tom Lane wrote:

> It seems that we've mostly got consensus on the ideas of having a separate
> script file for each installable version of an extension, and for each
> basic version-upgrade action, with version numbers embedded in the file
> names so that the control files don't need to be involved in identifying
> what's what.  And the core system is expected to be able to figure out how
> to chain upgrade scripts together when necessary.  Therefore, I'm now
> ready to start kibitzing on syntax details :-)

Damn, I thought you were going to get rid of the control file there for a sec (in favor of Makefile variables). ;-P

> 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.

What's the WRAPPER bit for? I've forgotten.

> 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'm fine with either of these. "foo-0-1.0.sql" might lead to fewer questions being asked. But I otherwise have no
preference.

> Third, I'm also not thrilled with the syntax "ALTER EXTENSION foo
> UPGRADE".  UPGRADE isn't an existing keyword (note that VERSION is).
> 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.
>
> OK, that's enough bikeshedding for today ...

The former reads much more clearly to me.

Best,

David




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3