]> granicus.if.org Git - postgresql/commit
Centralize definition of integer limits.
authorAndres Freund <andres@anarazel.de>
Wed, 25 Mar 2015 21:39:42 +0000 (22:39 +0100)
committerAndres Freund <andres@anarazel.de>
Wed, 25 Mar 2015 21:39:42 +0000 (22:39 +0100)
commit83ff1618bc9d4e530d3ef2a668a71326784a753c
treed295d560bd4481a61a6f5d036888ed7954b4b86b
parentbdc3d7fa2376a7a1e977383cc3221cfe44c4a893
Centralize definition of integer limits.

Several submitted and even committed patches have run into the problem
that C89, our baseline, does not provide minimum/maximum values for
various integer datatypes. C99's stdint.h does, but we can't rely on
it.

Several parts of the code defined limits locally, so instead centralize
the definitions to c.h.

This patch also changes the more obvious usages of literal limit values;
there's more places that could be changed, but it's less clear whether
it's beneficial to change those.

Author: Andrew Gierth
Discussion: 87619tc5wc.fsf@news-spur.riddles.org.uk
18 files changed:
contrib/btree_gist/btree_ts.c
contrib/intarray/_int_gist.c
contrib/pgbench/pgbench.c
src/backend/access/transam/xlog.c
src/backend/tsearch/wparser_def.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/tsrank.c
src/backend/utils/adt/txid.c
src/include/c.h
src/include/datatype/timestamp.h
src/include/executor/instrument.h
src/include/nodes/parsenodes.h
src/include/pg_config_manual.h
src/include/port/atomics.h
src/include/storage/predicate_internals.h
src/include/utils/date.h