BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument

From: acamari(at)verlet(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
Date: 2013-01-28 03:19:13
Message-ID: E1TzfFZ-0003L0-Ki@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7831
Logged by: Abel Abraham Camarillo Ojeda
Email address: acamari(at)verlet(dot)org
PostgreSQL version: 9.1.2
Operating system: OpenBSD-5.1/amd64.MP
Description:

user defined-aggregated don't set initcond to null when unspecified, instead
uses its first argument.

To reproduce:

$
$ cat > /tmp/sql
create or replace function
_foo (state double precision, i double precision)
returns double precision language sql immutable strict as
$$
select 999::double precision;
$$;

create aggregate foo (double precision) (
sfunc = _foo,
stype = double precision
);

select foo(0);
$
$ psql -U postgres template1 < /tmp/sql
CREATE FUNCTION
CREATE AGGREGATE
foo
-----
0
(1 row)

$
$ psql -U postgres template1
psql (9.1.2)
Type "help" for help.

template1=#

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-01-28 04:53:15 Re: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
Previous Message Bruce Momjian 2013-01-26 18:25:38 Re: Re: [BUGS] BUG #7515: DROP TABLE IF EXISTS fails if schema does not exist