Re: oracle's first_value function for postgres?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: oracle's first_value function for postgres?
Дата
Msg-id 26970.1126648231@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: oracle's first_value function for postgres?  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> On Tue, Sep 13, 2005 at 12:15:21PM -0700, Ben wrote:
>> Oracle has a very handy function called first_value, which can be used
>> to turn a set like this:

> Look at DISTINCT ON ()

>> Does postgres have something equivalent, or, even better, is there a
>> reasonable way to express this in standard SQL?

> In standard SQL, not really, which is why it's an extention...

Another way is to create an aggregate with a no-op transition
function ... also nonstandard, but you might be able to duplicate
Oracle's syntax that way.

            regards, tom lane

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

Предыдущее
От: Jerry LeVan
Дата:
Сообщение: Pushing result set to table on different machine?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Replication