From: acamari@verlet.org
To: pgsql-bugs@postgresql.org
Subject: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
Date: Mon, 28 Jan 2013 03:19:13 +0000
Message-ID: <E1TzfFZ-0003L0-Ki@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 7831
Logged by: Abel Abraham Camarillo Ojeda
Email address: acamari@verlet.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=#
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: acamari@verlet.org
Subject: Re: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
In-Reply-To: <E1TzfFZ-0003L0-Ki@wrigleys.postgresql.org>
References: <E1TzfFZ-0003L0-Ki@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox