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

From: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgsql-function called twice in the same second -> Double Insert -> Error
Date: 2002-11-26 14:43:40
Message-ID: 200211262013.40626.shridhar_daithankar@persistent.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gianfranco Masia - Eprom s.r.l. 2002-11-26 14:48:30 Compatibility of future releases
Previous Message Jeff Eckermann 2002-11-26 14:40:34 Re: Migrating DAta from MSSQL to postgre