Re: count (DISTINCT expression [ , ... ] ) and documentation

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема Re: count (DISTINCT expression [ , ... ] ) and documentation
Дата
Msg-id 20081226191400.08551327@dawn.webthatworks.it
обсуждение исходный текст
Ответ на Re: count (DISTINCT expression [ , ... ] ) and documentation  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: count (DISTINCT expression [ , ... ] ) and documentation  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-general
On Fri, 26 Dec 2008 16:23:52 +0100
"Pavel Stehule" <pavel.stehule@gmail.com> wrote:

> 2008/12/26 Ivan Sergio Borgonovo <mail@webthatworks.it>:
> > On Fri, 26 Dec 2008 15:46:48 +0100
> > "Pavel Stehule" <pavel.stehule@gmail.com> wrote:
> >
> >> count has only one argument,
> >
> > then what was changed between 8.1 and 8.2 to change the docs?
> > None of the functions listed in:
> > http://www.postgresql.org/docs/8.2/static/functions-aggregate.html
> > seems to support
> > aggregate(distinct exp [,exp])
>
> http://www.postgresql.org/docs/8.2/interactive/functions-aggregate.html
>
> http://www.postgresql.org/docs/8.2/interactive/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE


yeah but no function seems to support

aggregate(distinct x, y)

> CREATE AGGREGATE name ( input_data_type [ , ... ] ) (
>     SFUNC = sfunc,
>     STYPE = state_data_type
>     [ , FINALFUNC = ffunc ]
>     [ , INITCOND = initial_condition ]
>     [ , SORTOP = sort_operator ]
> )


OK... but how am I going to implement an user defined aggregate that
support without resorting to C?

myaggfunc(distinct x, y)?

Otherwise to what is it referring

http://www.postgresql.org/docs/8.2/interactive/sql-expressions.html

aggregate_name (DISTINCT expression [ , ... ] )

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: "Emanuel Calvo Franco"
Дата:
Сообщение: Re: This is a limit-offset bug?
Следующее
От: David Fetter
Дата:
Сообщение: Re: count (DISTINCT expression [ , ... ] ) and documentation