Re: Better way to write aggregates?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Better way to write aggregates?
Дата
Msg-id 9496.1145629576@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Better way to write aggregates?  (Jan Dittmer <jdi@l4x.org>)
Список pgsql-performance
Jan Dittmer <jdi@l4x.org> writes:
> It would help if booleans could be casted to integer 1/0 :-)

As of 8.1 there is such a cast in the system:

regression=# select 't'::bool::int;
 int4
------
    1
(1 row)

In earlier releases you can make your own.

As for the original question, though: have you looked at the crosstab
functions in contrib/tablefunc?

            regards, tom lane

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

Предыдущее
От: "Dave Dutcher"
Дата:
Сообщение: Re: Little use of CPU ( < 5%)
Следующее
От: Alex Hayward
Дата:
Сообщение: Re: Hardware: HP StorageWorks MSA 1500