From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Centralize definition of integer limits.
Date: Wed, 25 Mar 2015 21:49:21 +0000
Message-ID: <E1YatAv-0007cu-KW@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/83ff1618bc9d4e530d3ef2a668a71326784a753c
Modified Files
--------------
contrib/btree_gist/btree_ts.c | 4 +--
contrib/intarray/_int_gist.c | 4 ++-
contrib/pgbench/pgbench.c | 6 +----
src/backend/access/transam/xlog.c | 2 +-
src/backend/tsearch/wparser_def.c | 6 +++--
src/backend/utils/adt/int8.c | 2 +-
src/backend/utils/adt/numutils.c | 2 +-
src/backend/utils/adt/timestamp.c | 8 ------
src/backend/utils/adt/tsrank.c | 3 ++-
src/backend/utils/adt/txid.c | 2 +-
src/include/c.h | 41 +++++++++++++++++++++++++++++
src/include/datatype/timestamp.h | 4 +--
src/include/executor/instrument.h | 2 +-
src/include/nodes/parsenodes.h | 2 +-
src/include/pg_config_manual.h | 4 +--
src/include/port/atomics.h | 4 +--
src/include/storage/predicate_internals.h | 2 +-
src/include/utils/date.h | 6 ++---
18 files changed, 68 insertions(+), 36 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: Centralize definition of integer limits.
In-Reply-To: <E1YatAv-0007cu-KW@gemulon.postgresql.org>
References: <E1YatAv-0007cu-KW@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox