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

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

2003-12-17 Thread Mark Shewmaker
Should there be a difference between the behavior of a "select for update" typed into psql directly versus "select into variable_name for update" done within a function? In other words: Is this a bug or a user misunderstanding: 1. Run the following commands to set up a table called mytable