Re: New Window Function: ROW_NUMBER_DESC() OVER() ?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: New Window Function: ROW_NUMBER_DESC() OVER() ?
Дата
Msg-id CAKFQuwbVkUj5A=VYykE=81x_WKyhpgutXuqpiRSQ=a6kL6V2bw@mail.gmail.com
обсуждение исходный текст
Ответ на New Window Function: ROW_NUMBER_DESC() OVER() ?  (Maiquel Grassi <grassi@hotmail.com.br>)
Ответы RE: New Window Function: ROW_NUMBER_DESC() OVER() ?  (Maiquel Grassi <grassi@hotmail.com.br>)
Список pgsql-hackers
On Tuesday, January 16, 2024, Maiquel Grassi <grassi@hotmail.com.br> wrote:
Hi developers,

I was working on loans and bank financing, specifically focusing on Amortization Systems. I had the need to reverse the counter for the total number of installments or for a specific set of installments. This "reversal" is essentially a reverse "row_number" function. I realized that it is to "hard work" to write PL/foo functions for this or even to implement it in just SQL using little code.

I think “row_number() over (order by … desc)”  is a sufficient way to get this behavior and this isn’t something useful enough to warrant being the first ordering-specific function in the system.

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Postgres Database Service Interruption
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs