From: | tgl(at)svr1(dot)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Adjust the API for aggregate function calls so that a C-coded |
Date: | 2005-03-12 20:25:07 |
Message-ID: | 20050312202507.2320A556D3@svr1.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Adjust the API for aggregate function calls so that a C-coded function
can tell whether it is being used as an aggregate or not. This allows
such a function to avoid re-pallocing a pass-by-reference transition
value; normally it would be unsafe for a function to scribble on an input,
but in the aggregate case it's safe to reuse the old transition value.
Make int8inc() do this. This gets a useful improvement in the speed of
COUNT(*), at least on narrow tables (it seems to be swamped by I/O when
the table rows are wide). Per a discussion in early December with
Neil Conway. I also fixed int_aggregate.c to check this, thereby
turning it into something approaching a supportable technique instead
of being a crude hack.
Modified Files:
--------------
pgsql/contrib/intagg:
int_aggregate.c (r1.15 -> r1.16)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/intagg/int_aggregate.c.diff?r1=1.15&r2=1.16)
int_aggregate.sql.in (r1.7 -> r1.8)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/intagg/int_aggregate.sql.in.diff?r1=1.7&r2=1.8)
pgsql/doc/src/sgml:
xaggr.sgml (r1.26 -> r1.27)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/xaggr.sgml.diff?r1=1.26&r2=1.27)
xfunc.sgml (r1.99 -> r1.100)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/xfunc.sgml.diff?r1=1.99&r2=1.100)
pgsql/src/backend/executor:
nodeAgg.c (r1.128 -> r1.129)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeAgg.c.diff?r1=1.128&r2=1.129)
pgsql/src/backend/utils/adt:
int8.c (r1.57 -> r1.58)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/int8.c.diff?r1=1.57&r2=1.58)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-12 21:11:50 | pgsql: Fix ALTER DATABASE RENAME to allow the operation if user is a |
Previous Message | User Dfetter | 2005-03-12 19:52:44 | docbot - docbot: All subs now conform to perlstyle. |