Re: Stored procedure workflow question

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Stored procedure workflow question
Дата
Msg-id 5488F91A.2000600@aklaver.com
обсуждение исходный текст
Ответ на Re: Stored procedure workflow question  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Ответы Re: Stored procedure workflow question  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-general
On 12/10/2014 05:03 PM, Gavin Flower wrote:
> On 11/12/14 13:53, Israel Brewster wrote:
>> Currently, when I need to create/edit a stored procedure in
>> Postgresql, my workflow goes like the following:
>>
>> - Create/edit the desired function in my "DB Commands" text file
>> - Copy and paste function into my development database
>> - Test
>> - repeat above until it works as desired
>> - Copy and paste function into my production DB.
>>
>> To edit an existing function, the workflow is basically the same as
>> above, but I first have to find the function in my file.
>>
>> This whole workflow just feels kludgy to me. Is there a better way? Or
>> is that essentially the recommended procedure? Thanks.
>> -----------------------------------------------
>> Israel Brewster
>> Systems Analyst II
>> Ravn Alaska
>> 5245 Airport Industrial Rd
>> Fairbanks, AK 99709
>> (907) 450-7293
>> -----------------------------------------------
>>
>>
>>
>>
>>
> I create an SQL file using a text editer, and then execute it in psql
> using the '\i' command from the appropriate directory:
>
> gavin=> \i bus.sql
>
> I your case I would test it in one environment and copy it to another.
>
> You could use git to track versions of the file and the nature of changes.
>
> Though, I am sure there are sophisticated ways of doing this!

Two that come to mind:

Sqitch

http://sqitch.org/

Alembic

https://alembic.readthedocs.org/en/latest/

>
>
> Cheers,
> Gavin
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Guyren Howe
Дата:
Сообщение: Re: [GENERAL] I did some testing of GIST/GIN vs BTree indexing…
Следующее
От: Paul Jungwirth
Дата:
Сообщение: Re: Stored procedure workflow question