PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15676
PG Version11.2
OSall
Opened2019-03-07 17:02:41+00
Reported byGunther Schadow
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15676
Logged by:          Gunther Schadow
Email address:      (redacted)
PostgreSQL version: 11.2
Operating system:   all
Description:        

SELECT ... FOR UPDATE locks the roiw(s) being retrieved.

UNION ALL is a nice way to retrieving rows from two tables, and
implementation of UNION ALL is just a concatenation, each row returned comes
from either one of the base table, and thus could be locked.

Obviously the hard set semantics relational operators UNION (without ALL),
INTERSECT, EXCEPT, and really also DISTINCT, should justifiable have limits
in how you might to row locking. So it is justified not to support FOR
UPDATE on those concepts. But on a UNION ALL it is not justified, only that
it has not been done, and the error suggests that the UNION ALL case has not
bee considered as fundamentally different from the other set operators.

Messages

DateAuthorSubject
2019-03-07 17:02:41+00PG Bug reporting formBUG #15676: FOR UPDATE is not allowed with UNION ALL (and of course with UNION/INTERSECT/EXCEPT, DISTINCT?)
2019-03-07 19:38:37+00Tom LaneRe: BUG #15676: FOR UPDATE is not allowed with UNION ALL (and of course with UNION/INTERSECT/EXCEPT, DISTINCT?)