Re: Database Insertion commitment

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: Database Insertion commitment
Дата
Msg-id 1183971426.5778.58.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Database Insertion commitment  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
Список pgsql-general
On mán, 2007-07-09 at 03:34 -0400, Jasbinder Singh Bali wrote:
> My scenario is something like this. I'll try to make it modular and
> simple.
>
> Start Function A (Written in plperlu with no subtransactions)
>      Insert 1 on tbl_abc; (fires trigger A)
>      Insert 2 on tbl_abc; (fires trigger A)
> End Function A
>
> Start Trigger A
>        check the value of col_abc in tbl_abc
>        Start Activity A if col_abc in tbl_abc doesn't is not
> duplicated.
> End Trigger A
>
> Now, if Insert 1 inserts col_abc  = 'xyz' in tbl_abc
> and Insert 2 inserts the same value of col_abc ='xyz' the its not able
> to see the value of insert 1
> and erroneously starts Activity A that it should not actually.
>
> Do you think I am missing something vital here?
> I'm kind of stuck and confused because fundamentally Insert 2 should
> be able to see the value of Insert 1 as there is no subtransaction
> involved.

maybe you should provide us with a simple test case, to illustrate your
problem.

gnari



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

Предыдущее
От: Viatcheslav Kalinin
Дата:
Сообщение: Re: Database Insertion commitment
Следующее
От: Ragnar
Дата:
Сообщение: Re: How to obtain a sequence's increment value from the system catalog