Re: SELECT FOR UPDATE

From: will trillich <will(at)serensoft(dot)com>
To: Postgres <pgsql-general(at)postgresql(dot)org>
Subject: Re: SELECT FOR UPDATE
Date: 2001-08-23 08:30:12
Message-ID: 20010823033012.H15403@serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 22, 2001 at 09:01:10PM -0400, Jan Wieck wrote:
> jose wrote:
> > - Is it possible to know in advance if the records of a given query are
> > locked, to prevent to be locked for ever?
> Anyway, the answer is no. Standard SQL doesn't have any
> mechanism to check wether a given row is locked or to force a
> query to fail with an error in the case a required lock isn't
> available immediately.
>
> But the question itself tells that you're about to implement
> a major design error in your application. Holding database
> locks during user interaction IS A BAD THING. Never, never
> ever do it that way. And anybody telling you something
> different is an overpaid idiot.

"never ever do it THAT way." okay.

what way SHOULD we do it?

--
Khan said that revenge is a dish best served cold. I think
sometimes it's best served hot, chunky, and foaming.
- P.J.Lee ('79-'80)

will(at)serensoft(dot)com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Colin 't Hart 2001-08-23 08:30:57 Re: Help Problem mysql ????
Previous Message will trillich 2001-08-23 08:25:24 Re: Dynamically discovering field names in PLPGSQL queries