Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TzfFg-0000Wv-C7 for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Jan 2013 03:19:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TzfFf-0002VE-56 for pgsql-bugs@arkaria.postgresql.org; Mon, 28 Jan 2013 03:19:19 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TzfFd-0002V6-5T for pgsql-bugs@postgresql.org; Mon, 28 Jan 2013 03:19:17 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TzfFb-00044W-AH for pgsql-bugs@postgresql.org; Mon, 28 Jan 2013 03:19:16 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TzfFa-0004PS-4c for pgsql-bugs@postgresql.org; Mon, 28 Jan 2013 03:19:14 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1TzfFZ-0003L0-Ki for pgsql-bugs@postgresql.org; Mon, 28 Jan 2013 03:19:13 +0000 Date: Mon, 28 Jan 2013 03:19:13 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument To: pgsql-bugs@postgresql.org From: acamari@verlet.org X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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:=20=20=20=20=20=20=20=20 user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument. To reproduce: $=20 $ 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 =3D _foo, stype =3D double precision ); select foo(0); $=20 $ psql -U postgres template1 < /tmp/sql CREATE FUNCTION CREATE AGGREGATE foo=20 ----- 0 (1 row) $ $ psql -U postgres template1 psql (9.1.2) Type "help" for help. template1=3D#=20 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs