Re: First Aggregate Funtion?
От | Paul A Jungwirth |
---|---|
Тема | Re: First Aggregate Funtion? |
Дата | |
Msg-id | CA+renyURWvNyYiR++4zbzuXyzrY0jBgS0ViQYM2Lj0A8B7M=YQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: First Aggregate Funtion? (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: First Aggregate Funtion?
Re: First Aggregate Funtion? |
Список | pgsql-hackers |
> The above implementation of "first" aggregate returns the first non-NULL item > value. I'm curious what advantages this approach has over these FIRST/LAST functions from the Wiki?: https://wiki.postgresql.org/wiki/First/last_%28aggregate%29 Also to get the "first non-null value" you can apply an ordering to just the aggregate function, e.g.: select first(id order by start_time nulls last) from events; If you want speed you should probably write a C version. Is there something I'm missing? Also since we're on the hackers list is this a proposal to add these functions to core Postgres? Yours, Paul
В списке pgsql-hackers по дате отправления: