Re: Help on Procedure running external function - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: Help on Procedure running external function
Date
Msg-id 20050705123948.GB11379@wolff.to
Whole thread Raw
In response to Re: Help on Procedure running external function  (Zac <zaccheob@inwind.it>)
Responses Re: Help on Procedure running external function
List pgsql-sql
On Tue, Jul 05, 2005 at 13:47:24 +0200, Zac <zaccheob@inwind.it> wrote:
> I think you should use 'FOR UPDATE' clause in your first "select":
> 
> select into vnrBon maxnrbon+1 from MagMaxNrBon where magazie = 
> dsgroup.magazie_implicita_lansare FOR UPDATE;
> 
> In this way you lock the rows eventually returned and no one can update 
> them (or select them "for update") until your transaction finished.

That doesn't work because you don't lock rows which aren't in the table
yet. You need to use a lock table instead.


pgsql-sql by date:

Previous
From: Din Adrian
Date:
Subject: Re: Help on Procedure running external function
Next
From: Din Adrian
Date:
Subject: Re: Help on Procedure running external function