ANSI SQL proposal: SELECT DISTINCT ON (... ORDER BY ...) and UNION DISTINCT ON (... ORDER BY ...)

Edit
ID 7307
Title ANSI SQL proposal: SELECT DISTINCT ON (... ORDER BY ...) and UNION DISTINCT ON (... ORDER BY ...)
CI (CFBot) Summary
Stats (from CFBot) Patch version: v2, Patch count: 4, First patch: +80−67, All patches: +1077−148
Tags SQL Commands
Created 2026-09-16 15:17:34
Last modified 2026-09-16 15:17:34 (3 weeks ago)
Latest email 2026-09-18 17:01:01 (2 weeks ago)
Status
PG20-3 (2026-11-01 – 2026-11-30): Needs review
Target version
Authors Hannu Krosing (hannukrosing)
Reviewers Become reviewer
Committer
Links
Emails
ANSI SQL proposal: SELECT DISTINCT ON (... ORDER BY ...) and UNION DISTINCT ON (... ORDER BY ...)
First at 2026-08-01 13:08:48 by Hannu Krosing <hannuk at google.com>
Latest at 2026-09-18 17:01:01 by Hannu Krosing <hannuk at google.com>
Latest attachment (v2-0001-Refactor-set-operation-group-clauses-to-decouple-fro.patch) at 2026-09-16 20:40:42 from Hannu Krosing <hannuk at google.com>
    Attachment (v2-0001-Refactor-set-operation-group-clauses-to-decouple-fro.patch) at 2026-09-16 20:40:42 from Hannu Krosing <hannuk at google.com> (Patch: No)
    Attachment (0001-Refactor-set-operation-group-clauses-to-decouple-fro.patch) at 2026-09-16 15:15:41 from Hannu Krosing <hannuk at google.com> (Patch: No)
    Attachment (xxx000-distinct-on-clause.md) at 2026-08-01 13:08:48 from Hannu Krosing <hannuk at google.com> (Patch: No)
History
When Who What
2026-09-16 21:30:43 CFbot Patch does not need rebase anymore
2026-09-16 15:39:32 CFbot Patch needs rebase
2026-09-16 15:17:34 Hannu Krosing (hannukrosing) Attached mail thread CAMT0RQR_QqLqKdLgh3zYk7yA7oH9RJBVF+kZJ607wjJD9WKH9Q@mail.gmail.com
2026-09-16 15:17:34 Hannu Krosing (hannukrosing) Created patch record
Edit