Aggregate functions on ordered data?

Поиск
Список
Период
Сортировка
От Andreas Lehrbaum
Тема Aggregate functions on ordered data?
Дата
Msg-id 200306222153.55653.andreas.lehrbaum@kabelweb.at
обсуждение исходный текст
Ответы Re: Aggregate functions on ordered data?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Is it possible in _any_ way to control the order of the rows passed to an
aggregate function?

My problem is the following: I have tables with timestamps (PK) and bigint
values (gathered from snmp Counter32 entries) and I want to write an
aggregate function which sums over the differences between two entries which
follow one another in time and also accounts for range-wraps of the 32bit
values.

I have come up with a plpgsql version which does exactly that but as far as I
understand I can not be sure that the rows reach the aggregate sfunc in the
order of the timestamps. Is this order indetermined or is it always the order
of the rows in the table?

Anyway my problem remains: how to make sure the aggregate sfunc gets called in
the order I want?

Any help would be greatly appreciated!


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

Предыдущее
От: MT
Дата:
Сообщение: Re: Running pg_dump under vcron
Следующее
От: MT
Дата:
Сообщение: Re: Running pg_dump under vcron