Re: SELECT FOR UPDATE and LIMIT 1 behave oddly - Mailing list pgsql-bugs

From Josh Berkus
Subject Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
Date
Msg-id 200411110955.35094.josh@agliodbs.com
Whole thread Raw
In response to SELECT FOR UPDATE and LIMIT 1 behave oddly  (Josh Berkus <josh@agliodbs.com>)
Responses Re: SELECT FOR UPDATE and LIMIT 1 behave oddly
List pgsql-bugs
Bruce,

Ah, yes, which reminds me I need to generate that doc patch.

> I am wondering if a documentation warning about the use of FOR UPDATE
> and LIMIT is a good idea.  If we can't be sure the LIMIT will return a
> guaranteed number of rows, should we just disallow that combination?  I
> realize such a case is rare.  Should we emit a warning when it happens?

Well, limit+for update can be useful under some circumstances, as long as you
understand its limitations.    We found a workaround.  So I'd oppose
disallowing it.

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-bugs by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: BUG #1312: the ordinal 2821 could not be located
Next
From: Bruce Momjian
Date:
Subject: Re: SELECT FOR UPDATE and LIMIT 1 behave oddly