Re: Creating a selective aggregate ??

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Creating a selective aggregate ??
Дата
Msg-id 87oemxupq3.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Creating a selective aggregate ??  ("Najib Abi Fadel" <nabifadel@usj.edu.lb>)
Список pgsql-hackers
"Najib Abi Fadel" <nabifadel@usj.edu.lb> writes:

> Any ideas??
> Could this be done with aggregates ??

I think you're going to have to write code that reads all the records, keeps
state representing the current period start and the last seen end date and
outputs data every time it sees a gap like you want.

This could be a set returning plpgsql or plperl or plwhatever function, but it
may be easier to write it in your application level code.

-- 
greg



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

Предыдущее
От: Michael Brusser
Дата:
Сообщение: Re: Adding VERSION to startup log output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: nested-xacts cursors (was Re: Performance with new nested-xacts code)