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

Started by Michael Paquierover 12 years ago3 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

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

Attachments:

20130805_forlock_doc.patchapplication/octet-stream; name=20130805_forlock_doc.patchDownload+24-0
#2Bruce Momjian
bruce@momjian.us
In reply to: Michael Paquier (#1)
Re: FOR UPDATE/SHARE incompatibility with GROUP BY, DISTINCT, HAVING and window functions

On Mon, Aug 5, 2013 at 04:20:40PM +0900, Michael Paquier wrote:

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,

Patch applied. Thanks.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Michael Paquier
michael@paquier.xyz
In reply to: Bruce Momjian (#2)
Re: FOR UPDATE/SHARE incompatibility with GROUP BY, DISTINCT, HAVING and window functions

On Sat, Feb 1, 2014 at 6:37 AM, Bruce Momjian <bruce@momjian.us> wrote:

On Mon, Aug 5, 2013 at 04:20:40PM +0900, Michael Paquier wrote:

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,

Patch applied. Thanks.

Thanks.
--
Michael

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers