mirror of
https://github.com/postgres/postgres.git
synced 2025-08-09 17:03:00 +03:00
Add, optional, support for 128bit integers.
We will, for the foreseeable future, not expose 128 bit datatypes to SQL. But being able to use 128bit math will allow us, in a later patch, to use 128bit accumulators for some aggregates; leading to noticeable speedups over using numeric. So far we only detect a gcc/clang extension that supports 128bit math, but no 128bit literals, and no *printf support. We might want to expand this in the future to further compilers; if there are any that that provide similar support. Discussion: 544BB5F1.50709@proxel.se Author: Andreas Karlsson, with significant editorializing by me Reviewed-By: Peter Geoghegan, Oskari Saarenmaa
This commit is contained in:
@@ -293,6 +293,17 @@ typedef unsigned long long int uint64;
|
||||
#define HAVE_INT64_TIMESTAMP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 128-bit signed and unsigned integers
|
||||
* There currently is only a limited support for the type. E.g. 128bit
|
||||
* literals and snprintf are not supported; but math is.
|
||||
*/
|
||||
#if defined(PG_INT128_TYPE)
|
||||
#define HAVE_INT128
|
||||
typedef PG_INT128_TYPE int128;
|
||||
typedef unsigned PG_INT128_TYPE uint128;
|
||||
#endif
|
||||
|
||||
/* sig_atomic_t is required by ANSI C, but may be missing on old platforms */
|
||||
#ifndef HAVE_SIG_ATOMIC_T
|
||||
typedef int sig_atomic_t;
|
||||
|
Reference in New Issue
Block a user