From: | "Robert Haas" <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Sebastian Böhm <psql(at)seb(dot)exse(dot)net>, "Richard Huxton" <dev(at)archonet(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [SQL] reliable lock inside stored procedure (SOLVED) |
Date: | 2008-11-04 00:26:47 |
Message-ID: | 603c8f070811031626o62bdb84dw1f44b083eaea1a38@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
> 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 be the intended behavior, but that
> sure seems a whole lot less probable than it being user error.
> And you could always throw BEGIN/COMMIT into the command if that
> really was what you wanted.
>
> Objections anyone?
No, I've been bitten by this myself.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Brendan Jurd | 2008-11-04 00:26:52 | Re: Grant proposal |
Previous Message | Vladimir Sitnikov | 2008-11-04 00:18:47 | Re: Bitmap Indexes patch (was Re: Bitmap Indexes: request for feedback) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-11-04 00:57:59 | Re: [SQL] reliable lock inside stored procedure (SOLVED) |
Previous Message | Tom Lane | 2008-11-03 23:59:17 | Re: Date Index |