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

Поиск
Список
Период
Сортировка
От Maiquel Grassi
Тема RE: New Window Function: ROW_NUMBER_DESC() OVER() ?
Дата
Msg-id CP8P284MB2496E7028B8858D20A8F47ADEC732@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на New Window Function: ROW_NUMBER_DESC() OVER() ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы New Window Function: ROW_NUMBER_DESC() OVER() ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
However, initially, I have one more obstacle in your feedback. If I use count(*) over() - row_number() over(), it gives me an offset of one unit. To resolve this, I need to add 1. 

This way, simulating a reverse row_number() becomes even more laborious.

I don’t really understand why you think this reverse inserted counting is even a good idea so I don’t really care how laborious it is to implement with existing off-the-shelf tools.  A window function named “descending” is non-standard and seemingly non-sensical and should not be added.  You can specify order by in the over clause and that is what you should be doing.  Mortgage payments are usually monthly, so order by date.

David J.

--//--

We are just raising hypotheses and discussing healthy possibilities here. This is a suggestion for knowledge and community growth. Note that this is not about a new "feature patch." I am asking for the community's opinion in general. Your responses are largely appearing aggressive and depreciative. Kindly request you to be more welcoming in your answers and not oppressive. This way, the community progresses more rapidly.

Maiquel.

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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: UUID v7
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs