Re: backend dies on my aggregate function in 7.1.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dirk Lutzebaeck <lutzeb(at)aeccom(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: backend dies on my aggregate function in 7.1.2
Date: 2001-08-25 04:37:09
Message-ID: 26405.998714229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dirk Lutzebaeck <lutzeb(at)aeccom(dot)com> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-08-25 10:16:16 Re: Error reporting when hitting shared memory limits -
Previous Message Shane Wegner 2001-08-25 00:48:18 Re: Permissions for large-object comments