FOR UPDATE/SHARE incompatibility with GROUP BY, DISTINCT, HAVING and window functions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: FOR UPDATE/SHARE incompatibility with GROUP BY, DISTINCT, HAVING and window functions
Date: 2013-08-05 07:20:40
Message-ID: CAB7nPqQvYaWiyoZAwFvFON_2o-GN58xO7qMJ4cdibjU_9_OQnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

By having a look at the documentation of SELECT, it is not specified that
FOR SHARE/UPDATE and friends are incompatible with the clauses in $subject
http://www.postgresql.org/docs/9.2/static/sql-select.html
This restriction is explicitly cited for INTERSECT and UNION though, so
people can get easily confused IMHO for the other clauses.

Does it make sense to mention in the documentation those limitations like
in the patch attached? If yes, perhaps this should be back-patched, after
removing the part about FOR NO KEY UPDATE and FOR KEY SHARE of course from
the patch attached for 9.2 and prior versions...
Regards,
--
Michael

Attachment Content-Type Size
20130805_forlock_doc.patch application/octet-stream 2.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2013-08-05 07:52:51 Re: query_planner() API change
Previous Message Ashutosh Bapat 2013-08-05 07:07:41 Re: query_planner() API change