-
- Downloads
sum() on int2 and int4 columns now uses an int8, not numeric, accumulator
for speed reasons; its result type also changes to int8. avg() on these datatypes now accumulates the running sum in int8 for speed; but we still deliver the final result as numeric, so that fractional accuracy is preserved. count() now counts and returns in int8, not int4. I am a little nervous about this possibly breaking users' code, but there didn't seem to be a strong sentiment for avoiding the problem. If we get complaints during beta, we can change count back to int4 and add a "count8" aggregate. For that matter, users can do it for themselves with a simple CREATE AGGREGATE command; the int4inc function is still present, so no C hacking is needed. Also added max() and min() aggregates for OID that do proper unsigned comparison, instead of piggybacking on int4 aggregates. initdb forced.
Showing
- doc/src/sgml/func.sgml 10 additions, 6 deletionsdoc/src/sgml/func.sgml
- src/backend/utils/adt/int8.c 9 additions, 1 deletionsrc/backend/utils/adt/int8.c
- src/backend/utils/adt/numeric.c 118 additions, 27 deletionssrc/backend/utils/adt/numeric.c
- src/backend/utils/adt/oid.c 19 additions, 1 deletionsrc/backend/utils/adt/oid.c
- src/backend/utils/fmgr/fmgr.c 15 additions, 1 deletionsrc/backend/utils/fmgr/fmgr.c
- src/include/catalog/catversion.h 2 additions, 2 deletionssrc/include/catalog/catversion.h
- src/include/catalog/pg_aggregate.h 9 additions, 7 deletionssrc/include/catalog/pg_aggregate.h
- src/include/catalog/pg_proc.h 16 additions, 3 deletionssrc/include/catalog/pg_proc.h
- src/include/utils/builtins.h 6 additions, 1 deletionsrc/include/utils/builtins.h
- src/include/utils/int8.h 2 additions, 1 deletionsrc/include/utils/int8.h
- src/test/regress/expected/opr_sanity.out 2 additions, 2 deletionssrc/test/regress/expected/opr_sanity.out
- src/test/regress/expected/rules.out 1 addition, 1 deletionsrc/test/regress/expected/rules.out
- src/test/regress/sql/rules.sql 1 addition, 1 deletionsrc/test/regress/sql/rules.sql
Loading
Please register or sign in to comment