Re: pgsql-function called twice in the same second -> Double Insert -> Error - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: pgsql-function called twice in the same second -> Double Insert -> Error
Date
Msg-id 200211262013.40626.shridhar_daithankar@persistent.co.in
Whole thread Raw
In response to pgsql-function called twice in the same second -> Double Insert -> Error  ("Peter Alberer" <h9351252@obelix.wu-wien.ac.at>)
List pgsql-general
On Tuesday 26 November 2002 07:25 pm, you wrote:
> Is this something I can circumvent on the Postgres (DB) Level or do I
> have to deal with that at the application level (Aolserver - TCL) ?

Looking at the description, I think you don't need to worry about anything.
The database is doing one transaction fine and aborting other which is fine
as well because the second call of function with exactly same parameters does
not make any sense either.

If you don't like the message, try sleeping in function or call select for
update so that it locks the row and can not get the lock in itself.. This
seems to be better approach to me..

HTH

 Shridhar


pgsql-general by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: Migrating DAta from MSSQL to postgre
Next
From: Oleg Shalnev
Date:
Subject: Re: How To Get Numetic Value!!! using C ???