Re: [HACKERS] [SQL] reliable lock inside stored procedure (SOLVED)

2008-11-03 Thread Tom Lane
"Robert Haas" <[EMAIL PROTECTED]> writes: >> That's a good point. We throw error for DECLARE CURSOR outside a >> transaction block, since it's obviously a mistake. I wonder whether >> we shouldn't equally throw error for LOCK outside a transaction block. >> >> Objections anyone? > No, I've been

Re: [HACKERS] [SQL] reliable lock inside stored procedure (SOLVED)

2008-11-03 Thread Robert Haas
> That's a good point. We throw error for DECLARE CURSOR outside a > transaction block, since it's obviously a mistake. I wonder whether > we shouldn't equally throw error for LOCK outside a transaction block. > > I can sort of imagine some corner cases where > lock-and-immediately-release would

Re: [HACKERS] [SQL] reliable lock inside stored procedure (SOLVED)

2008-11-03 Thread Tom Lane
=?ISO-8859-1?Q?Sebastian_B=F6hm?= <[EMAIL PROTECTED]> writes: > Am 03.11.2008 um 12:06 schrieb Richard Huxton: >> It's not possible to have a LOCK statement outside of a >> transaction. It's just not meaningful to have a transaction that only >> has a LOCK statement in it. > as postgres does not w