diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/c.h | 6 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 8 | ||||
-rw-r--r-- | src/include/pg_config_manual.h | 13 |
3 files changed, 19 insertions, 8 deletions
diff --git a/src/include/c.h b/src/include/c.h index 802a731267f..00e41ac546a 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -491,6 +491,12 @@ typedef signed int Offset; typedef float float4; typedef double float8; +#ifdef USE_FLOAT8_BYVAL +#define FLOAT8PASSBYVAL true +#else +#define FLOAT8PASSBYVAL false +#endif + /* * Oid, RegProcedure, TransactionId, SubTransactionId, MultiXactId, * CommandId diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 6f8549bc03b..c208dcdfc71 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -70,10 +70,6 @@ MSVC and with C++ compilers. */ #undef FLEXIBLE_ARRAY_MEMBER -/* float8, int8, and related values are passed by value if 'true', by - reference if 'false' */ -#undef FLOAT8PASSBYVAL - /* Define to 1 if gettimeofday() takes only 1 argument. */ #undef GETTIMEOFDAY_1ARG @@ -898,10 +894,6 @@ /* Define to use /dev/urandom for random number generation */ #undef USE_DEV_URANDOM -/* Define to 1 if you want float8, int8, etc values to be passed by value. - (--enable-float8-byval) */ -#undef USE_FLOAT8_BYVAL - /* Define to build with ICU support. (--with-icu) */ #undef USE_ICU diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 743401cb969..61b667d1663 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -57,6 +57,19 @@ #define PARTITION_MAX_KEYS 32 /* + * Decide whether built-in 8-byte types, including float8, int8, and + * timestamp, are passed by value. This is on by default if sizeof(Datum) >= + * 8 (that is, on 64-bit platforms). If sizeof(Datum) < 8 (32-bit platforms), + * this must be off. We keep this here as an option so that it is easy to + * test the pass-by-reference code paths on 64-bit platforms. + * + * Changing this requires an initdb. + */ +#if SIZEOF_VOID_P >= 8 +#define USE_FLOAT8_BYVAL 1 +#endif + +/* * When we don't have native spinlocks, we use semaphores to simulate them. * Decreasing this value reduces consumption of OS resources; increasing it * may improve performance, but supplying a real spinlock implementation is |