pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: gunther.schadow@gmail.com
Subject: BUG #15676: FOR UPDATE is not allowed with UNION ALL (and of course with UNION/INTERSECT/EXCEPT, DISTINCT?)
Date: Thu, 07 Mar 2019 17:02:41 +0000
Message-ID: <15676-8248e6b0beac09c6@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15676
Logged by:          Gunther Schadow
Email address:      gunther.schadow@gmail.com
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.



view thread (2+ messages)  latest in thread

Message-ID: <15676-8248e6b0beac09c6@postgresql.org>
Permalink:  ../15676-8248e6b0beac09c6@postgresql.org/
Also on:    postgresql.org/message-id/15676-8248e6b0beac09c6@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, gunther.schadow@gmail.com
  Subject: Re: BUG #15676: FOR UPDATE is not allowed with UNION ALL (and of course with UNION/INTERSECT/EXCEPT, DISTINCT?)
  In-Reply-To: <15676-8248e6b0beac09c6@postgresql.org>
  References: <15676-8248e6b0beac09c6@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox