Re: backend dies on my aggregate function in 7.1.2

От
Tom Lane
Тема
Re: backend dies on my aggregate function in 7.1.2
Дата
Msg-id
26405.998714229@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
backend dies on my aggregate function in 7.1.2 Dirk Lutzebaeck <lutzeb@aeccom.com>
Re: backend dies on my aggregate function in 7.1.2 Tom Lane <tgl@sss.pgh.pa.us>
Dirk Lutzebaeck  writes:
> *** the aggregate is then created by

> CREATE AGGREGATE maxalphanum (
>    SFUNC1 = maxalphanum_check,
>    BASETYPE = TEXT,
>    STYPE1 = TEXT
> );

You've not specified any initial condition for the aggregate's state
value.  This means the state starts out NULL ... and your transition
function isn't handling that.

You probably want to mark the transition function 'strict', but you
also need to consider what the initial condition should be: what do
you want returned for no input rows?

			regards, tom lane
В списке pgsql-general по дате отправления
От: Rob Arnold
Дата:
От: Peter Eisentraut
Дата:
Поиск
Список
Период
Сортировка
Искать
FAQ