Re: [GENERAL] pgplsql SELECT INTO ... FOR UPDATE

2004-12-15 Thread Berend Tober
> I'm trying to write a stored procedure in plpgsql that selects a row > and possibly increments one of its fields. I thought I would do SELECT > INTO my_record * FROM my_table FOR UPDATE WHERE ..., but apparently > plpgsql doesn't like the FOR UPDATE in a stored procedure. Does plpgsql > automatic

Re: [GENERAL] pgplsql SELECT INTO ... FOR UPDATE

2004-12-15 Thread Ragnar Hafstaư
On Wed, 2004-12-15 at 01:38 -0800, Eric Brown wrote: > > > __ > > I'm trying to write a stored procedure in plpgsql that selects a row > and possibly increments one of its fields. I thought I would do SELECT > INTO my_record * F

Re: [GENERAL] pgplsql SELECT INTO ... FOR UPDATE (transaction/locking

2004-12-15 Thread John Sidney-Woollett
I've got a few plpgsql stored functions (in 7.4.x) that use the select x into y from table where condition for update syntax without any problem. Maybe there's something else going on? John Sidney-Woollett Eric Brown wrote: I'm trying to write a stored procedure in plpgsql that selects a row and p

[GENERAL] pgplsql SELECT INTO ... FOR UPDATE (transaction/locking question)

2004-12-15 Thread Eric Brown
I'm trying to write a stored procedure in plpgsql that selects a row and possibly increments one of its fields. I thought I would do SELECT INTO my_record * FROM my_table FOR UPDATE WHERE ..., but apparently plpgsql doesn't like the FOR UPDATE in a stored procedure. Does plpgsql automatically lock