pgsql: Adjust the API for aggregate function calls so that a C-coded
| От | tgl@svr1.postgresql.org (Tom Lane) |
|---|---|
| Тема | pgsql: Adjust the API for aggregate function calls so that a C-coded |
| Дата | |
| Msg-id | 20050312202507.2320A556D3@svr1.postgresql.org обсуждение исходный текст |
| Список | 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)
В списке pgsql-committers по дате отправления: