Re: Database Insertion commitment - Mailing list pgsql-general

From Ragnar
Subject Re: Database Insertion commitment
Date
Msg-id 1183971426.5778.58.camel@localhost.localdomain
Whole thread Raw
In response to Re: Database Insertion commitment  ("Jasbinder Singh Bali" <jsbali@gmail.com>)
List 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 by date:

Previous
From: Viatcheslav Kalinin
Date:
Subject: Re: Database Insertion commitment
Next
From: Ragnar
Date:
Subject: Re: How to obtain a sequence's increment value from the system catalog