Idea: Add first() and last() aggregate functions to the main release

From: Ben Clements <benhasgonewalking(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Idea: Add first() and last() aggregate functions to the main release
Date: 2023-03-11 12:20:09
Message-ID: CAFKPu3vbndttudiWKhewG+46v=Xn3DB0f9qh-P3itwCqsYEp-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Idea/request for enhancement:

Add the first() and last() aggregate functions to the main release (CREATE
EXTENSION first_last_agg).

Use Case: PostgreSQL equivalent to Oracle's MAX(...) KEEP (DENSE_RANK
FIRST/LAST ORDER BY ...) <https://dba.stackexchange.com/a/324646/100880>
(https://dba.stackexchange.com/a/324646/100880)

GitHub: https://github.com/wulczer/first_last_agg

Reason: As a non-dba, I can’t install additional modules like first_last_agg
.

Thanks,
-Ben

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn de Munnik 2023-03-11 14:04:54 ERROR: only immutable functions supported in continuous aggregate view
Previous Message Ron 2023-03-10 22:49:52 Re: Practice advice for use of %type in declaring a subprogram's formal arguments