Re: [BUGS] SELECT FOR UPDATE differs inside and outside a pl/pgsql

2003-12-18 Thread Tom Lane
Mark Shewmaker <[EMAIL PROTECTED]> writes: > On Wed, 2003-12-17 at 19:57, Tom Lane wrote: >> Mark Shewmaker <[EMAIL PROTECTED]> writes: >>> If a "FOR UPDATE executes before LIMIT" rule stopped the function >>> from ever locking a row, it's still curious why didn't it stop the >>> direct command fro

Re: [BUGS] SELECT FOR UPDATE differs inside and outside a pl/pgsql

2003-12-18 Thread Mark Shewmaker
On Wed, 2003-12-17 at 19:57, Tom Lane wrote: > Mark Shewmaker <[EMAIL PROTECTED]> writes: > > If a "FOR UPDATE executes before LIMIT" rule stopped the function > > from ever locking a row, it's still curious why didn't it stop the > > direct command from ever locking a row as well. > >

Re: [BUGS] SELECT FOR UPDATE differs inside and outside a pl/pgsql

2003-12-17 Thread Tom Lane
Mark Shewmaker <[EMAIL PROTECTED]> writes: > If a "FOR UPDATE executes before LIMIT" rule stopped the function > from ever locking a row, it's still curious why didn't it stop the > direct command from ever locking a row as well. I think it would. Did you try the test the other way ar

Re: [BUGS] SELECT FOR UPDATE differs inside and outside a pl/pgsql

2003-12-17 Thread Mark Shewmaker
On Wed, 2003-12-17 at 14:02, Tom Lane wrote: > Mark Shewmaker <[EMAIL PROTECTED]> writes: > > In other words: Is this a bug or a user misunderstanding: > > You've got the function doing > > > LOOP > > select * into myrow from mytable limit 1 for update; > > if found then exit; >

Re: [BUGS] SELECT FOR UPDATE differs inside and outside a pl/pgsql function (7.4)

2003-12-17 Thread Tom Lane
Mark Shewmaker <[EMAIL PROTECTED]> writes: > In other words: Is this a bug or a user misunderstanding: You've got the function doing > LOOP > select * into myrow from mytable limit 1 for update; > if found then exit; > end if; > END LOOP; which means it will loop infin