diff options
author | Andres Freund <andres@anarazel.de> | 2015-04-02 17:43:35 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-04-02 17:43:35 +0200 |
commit | 62e2a8dc2c7f6b1351a0385491933af969ed4265 (patch) | |
tree | 3fd46136353e1838f871478232935dbba0866392 /src/include/executor | |
parent | e146ca682062ca1f5015f3820571c5359f5f9dba (diff) | |
download | postgresql-62e2a8dc2c7f6b1351a0385491933af969ed4265.tar.gz postgresql-62e2a8dc2c7f6b1351a0385491933af969ed4265.zip |
Define integer limits independently from the system definitions.
In 83ff1618 we defined integer limits iff they're not provided by the
system. That turns out not to be the greatest idea because there's
different ways some datatypes can be represented. E.g. on OSX PG's 64bit
datatype will be a 'long int', but OSX unconditionally uses 'long
long'. That disparity then can lead to warnings, e.g. around printf
formats.
One way to fix that would be to back int64 using stdint.h's
int64_t. While a good idea it's not that easy to implement. We would
e.g. need to include stdint.h in our external headers, which we don't
today. Also computing the correct int64 printf formats in that case is
nontrivial.
Instead simply prefix the integer limits with PG_ and define them
unconditionally. I've adjusted all the references to them in code, but
not the ones in comments; the latter seems unnecessary to me.
Discussion: 20150331141423.GK4878@alap3.anarazel.de
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/instrument.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index db9d1e8ff05..c9a2129c7ae 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -38,7 +38,7 @@ typedef enum InstrumentOption INSTRUMENT_TIMER = 1 << 0, /* needs timer (and row counts) */ INSTRUMENT_BUFFERS = 1 << 1, /* needs buffer usage */ INSTRUMENT_ROWS = 1 << 2, /* needs row count */ - INSTRUMENT_ALL = INT32_MAX + INSTRUMENT_ALL = PG_INT32_MAX } InstrumentOption; typedef struct Instrumentation |