Re: Changing a trigger function

Поиск
Список
Период
Сортировка
От Terry Lee Tucker
Тема Re: Changing a trigger function
Дата
Msg-id 200804240523.19497.terry@chosen-ones.org
обсуждение исходный текст
Ответ на Changing a trigger function  ("Didier Gasser-Morlay" <didiergm@gmail.com>)
Список pgsql-novice
On Thursday 24 April 2008 05:08, Didier Gasser-Morlay wrote:
> I have found a nasty bug in one of the trigger function I did put into
> production a couple of days ago. I have a fix for it but wonder if I
> can put it into the production database with users connected on it.
>
> What would happen if someone sends an update firing that trigger
> whilst I am in the middle of updating it  via a create or update ? Do
> I need to wait for this evening or can I safely runs the update of the
> function ?
>
> I know that several other databases would reject the update (Sybase,
> Firebird for example) but I am too new to PostgresSQL to know what
> would happen in such a situation
>
>
>
> Didier

You do not have to wait to load the trigger. If some process accesses the
trigger in the midst of your loading it, it will be handled in the same way
as someone reading a set of records from a table while another is inserting
or updating records in the same table; that is, the data as it existed before
the transaction started would be used. Loading the trigger will behave the
same way. We've done this many times.
--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812  Fax: (336) 372-6812  Cell: (336) 404-6987
terry@turbocorp.com
www.turbocorp.com

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Changing a trigger function
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Limiting the number of connections for one user