Re: ALTER EXTENSION UPGRADE, v3

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: ALTER EXTENSION UPGRADE, v3
Дата
Msg-id AANLkTin+LsJQ+PjHAe=x6_hizcEMYJ4ZeVqk2YM2O-MR@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ALTER EXTENSION UPGRADE, v3  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-hackers
On Thu, Feb 3, 2011 at 9:53 AM, Ross J. Reedstrom <reedstrm@rice.edu> wrote:
>> Example:
>>
>> upgrade_from_1_0 = '1.0 => upgrade_from_1.0.sql'
>> upgrade_from_2_0 = '2.0 => upgrade_from_2.0.sql'
>> upgrade_from_3_0 = '3.0 => upgrade_from_3.0.sql'
>
> Hmm, how about allowing a list of files to execute? That allows the
> developer to create modularized sql, and composite it in the config:
>
> for a mythical version 4.0:
>
> 1.0 => add_foobar_table.sql new_method_baz.sql
> 2.0 => drop_method_baz.sql add_quuz_table.sql
> # oops, we still needed this
> 3.0 => new_method_baz.sql
>
> I know when I'm developing such upgrades, the code looks like that,
> until I need to shoehorn them into the upgrade systems idea of version
> numbers matching names to find scripts to run.

Good idea.  My code looks that way too.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: ALTER EXTENSION UPGRADE, v3