Re: ALTER EXTENSION ... UPGRADE;

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: ALTER EXTENSION ... UPGRADE;
Дата
Msg-id 4D02D071.4070707@agliodbs.com
обсуждение исходный текст
Ответ на Re: ALTER EXTENSION ... UPGRADE; (was: Extensions, patch v16)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ALTER EXTENSION ... UPGRADE;  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Tom,

> I don't believe that extension SQL scripts should rely on DO blocks.
> There is no requirement that plpgsql be installed, and we're not going
> to create one as part of this feature.  What this means is that the
> design you offer above doesn't work at all, since it fundamentally
> assumes that the SQL script can do conditional logic.  What's more,
> it fundamentally assumes that the script WILL do conditional logic
> and support (in one lump) every possible combination of versions.
> That's going to turn into buggy spaghetti-code very quickly.

I just noticed this response, and don't think it can stand as-is.

While I agree that it's not reasonable to have a single script which
supports every combination of versions, I also assert that it's
completely unreasonable to expect extension authors to write upgrade
scripts with no conditional logic.  Your view would essentially be
requiring authors to write a completely seperate SQL script for every
single possible combination of two versions.

For an extension which has had 10 releases with SQL modifications, this
would be 45 separate upgrade files.  That's a ridiculous thing to expect
of any contributor.

I, for one, have no problem whatsoever with requiring that users have
plpgsql installed in order to use extensions. It's installed by default.
If they need to uninstall plpgsql for some security reason, then fine;
they can write their own upgrade scripts.  You are pushing making things
easy for 0.5% of our users at the expense of everyone else.

--                                  -- Josh Berkus                                    PostgreSQL Experts Inc.
                        http://www.pgexperts.com
 


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

Предыдущее
От: Daniel Loureiro
Дата:
Сообщение: Re: Anyone for SSDs?
Следующее
От: Vaibhav Kaushal
Дата:
Сообщение: Re: Anyone for SSDs?