diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-12 20:25:06 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-12 20:25:06 +0000 |
commit | fa5e44017a8cea141d1730e695c5cc2051158114 (patch) | |
tree | daafe69293544a73d64701bd38a629d32d0727fc /src/backend/commands/dbcommands.c | |
parent | de004e44e2cb4c3def05ba3d9f1a6f23e802bea3 (diff) | |
download | postgresql-fa5e44017a8cea141d1730e695c5cc2051158114.tar.gz postgresql-fa5e44017a8cea141d1730e695c5cc2051158114.zip |
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.
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions