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

2008-11-03 Thread Sebastian Böhm
Hi Richard, thank you for your answer! Am 03.11.2008 um 12:06 schrieb Richard Huxton: Sebastian Böhm wrote: Hi, I have a stored procedure and I need a SHARE ROW EXCLUSIVE lock in this procedure (otherwise data will get corrupted). OK. PostgreSQL doesn't have "stored procedures" so I gu

Re: [SQL] reliable lock inside stored procedure

2008-11-03 Thread Richard Huxton
Sebastian Böhm wrote: > Hi, > > I have a stored procedure and I need a SHARE ROW EXCLUSIVE lock in this > procedure (otherwise data will get corrupted). OK. PostgreSQL doesn't have "stored procedures" so I guess you're talking about a function. > According to the documentation the LOCK statement

[SQL] reliable lock inside stored procedure

2008-11-03 Thread Sebastian Böhm
Hi, I have a stored procedure and I need a SHARE ROW EXCLUSIVE lock in this procedure (otherwise data will get corrupted). According to the documentation the LOCK statement is useless and will silently fail if not executed inside a transaction. (btw: this sounds dangerous to me) Also it