diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/c.h | 7 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 4 | ||||
-rw-r--r-- | src/include/pg_config.h.win32 | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpg_config.h.in | 4 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/pgtypes_interval.h | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c | 6 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout | 2 | ||||
-rw-r--r-- | src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc | 6 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 9 | ||||
-rw-r--r-- | src/tools/msvc/config_default.pl | 1 |
10 files changed, 10 insertions, 35 deletions
diff --git a/src/include/c.h b/src/include/c.h index 91e5baa9692..947bd980672 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -340,10 +340,11 @@ typedef unsigned PG_INT128_TYPE uint128; #define PG_INT64_MAX INT64CONST(0x7FFFFFFFFFFFFFFF) #define PG_UINT64_MAX UINT64CONST(0xFFFFFFFFFFFFFFFF) -/* Select timestamp representation (float8 or int64) */ -#ifdef USE_INTEGER_DATETIMES +/* + * We now always use int64 timestamps, but keep this symbol defined for the + * benefit of external code that might test it. + */ #define HAVE_INT64_TIMESTAMP -#endif /* * Size diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index b9dfdd41c1a..8dd73f1d915 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -831,10 +831,6 @@ (--enable-float8-byval) */ #undef USE_FLOAT8_BYVAL -/* Define to 1 if you want 64-bit integer timestamp and interval support. - (--enable-integer-datetimes) */ -#undef USE_INTEGER_DATETIMES - /* Define to 1 to build with LDAP support. (--with-ldap) */ #undef USE_LDAP diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index 199668c1876..fd1af59839d 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -625,10 +625,6 @@ /* Define to use /dev/urandom for random number generation */ /* #undef USE_DEV_URANDOM */ -/* Define to 1 if you want 64-bit integer timestamp and interval support. - (--enable-integer-datetimes) */ -/* #undef USE_INTEGER_DATETIMES */ - /* Define to 1 to build with LDAP support. (--with-ldap) */ /* #undef USE_LDAP */ diff --git a/src/interfaces/ecpg/include/ecpg_config.h.in b/src/interfaces/ecpg/include/ecpg_config.h.in index bf99a5e7930..736fb08dba3 100644 --- a/src/interfaces/ecpg/include/ecpg_config.h.in +++ b/src/interfaces/ecpg/include/ecpg_config.h.in @@ -10,10 +10,6 @@ /* Define to 1 if `long long int' works and is 64 bits. */ #undef HAVE_LONG_LONG_INT_64 -/* Define to 1 if you want 64-bit integer timestamp and interval support. - (--enable-integer-datetimes) */ -#undef USE_INTEGER_DATETIMES - /* Define to 1 to build client libraries as thread-safe code. * (--enable-thread-safety) */ #undef ENABLE_THREAD_SAFETY diff --git a/src/interfaces/ecpg/include/pgtypes_interval.h b/src/interfaces/ecpg/include/pgtypes_interval.h index deac6a2e01a..5118ec784d1 100644 --- a/src/interfaces/ecpg/include/pgtypes_interval.h +++ b/src/interfaces/ecpg/include/pgtypes_interval.h @@ -20,9 +20,7 @@ typedef long long int int64; #error must have a working 64-bit integer datatype #endif -#ifdef USE_INTEGER_DATETIMES #define HAVE_INT64_TIMESTAMP -#endif #endif /* C_H */ typedef struct diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c index 4277c2615da..b6e77562b24 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c @@ -145,10 +145,8 @@ main(void) sprintf(t, "%s %s", dates[i], times[j]); ts1 = PGTYPEStimestamp_from_asc(t, NULL); text = PGTYPEStimestamp_to_asc(ts1); - /* skip outputs sensitive to USE_INTEGER_DATETIMES */ - if (i != 19 || (j != 3 && j != 4)) - printf("TS[%d,%d]: %s\n", - i, j, errno ? "-" : text); + printf("TS[%d,%d]: %s\n", + i, j, errno ? "-" : text); free(text); free(t); } diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout index 941bffbd815..0fbcce67b68 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout @@ -103,6 +103,8 @@ Date[19]: 0099-01-08 BC (N - F) TS[19,0]: 0099-01-08 00:04:00 BC TS[19,1]: 0099-01-08 01:59:00 BC TS[19,2]: 0099-01-08 13:24:40 BC +TS[19,3]: 0099-01-08 13:24:40.495 BC +TS[19,4]: 0099-01-08 13:24:40.123456 BC Date[20]: - (N - T) Date[21]: - (N - T) interval[0]: @ 1 min diff --git a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc index 0bd1fec109d..d519305e188 100644 --- a/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc +++ b/src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc @@ -110,10 +110,8 @@ main(void) sprintf(t, "%s %s", dates[i], times[j]); ts1 = PGTYPEStimestamp_from_asc(t, NULL); text = PGTYPEStimestamp_to_asc(ts1); - /* skip outputs sensitive to USE_INTEGER_DATETIMES */ - if (i != 19 || (j != 3 && j != 4)) - printf("TS[%d,%d]: %s\n", - i, j, errno ? "-" : text); + printf("TS[%d,%d]: %s\n", + i, j, errno ? "-" : text); free(text); free(t); } diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index fbf4da3d68f..ff9064f923d 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -28,9 +28,6 @@ sub _new $self->DeterminePlatform(); my $bits = $self->{platform} eq 'Win32' ? 32 : 64; - # integer_datetimes is now the default - $options->{integer_datetimes} = 1 - unless exists $options->{integer_datetimes}; $options->{float4byval} = 1 unless exists $options->{float4byval}; $options->{float8byval} = ($bits == 64) @@ -169,8 +166,6 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY print O "#ifndef IGNORE_CONFIGURED_SETTINGS\n"; print O "#define USE_ASSERT_CHECKING 1\n" if ($self->{options}->{asserts}); - print O "#define USE_INTEGER_DATETIMES 1\n" - if ($self->{options}->{integer_datetimes}); print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap}); print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib}); print O "#define USE_OPENSSL 1\n" if ($self->{options}->{openssl}); @@ -427,8 +422,6 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY #define HAVE_LONG_LONG_INT_64 #define ENABLE_THREAD_SAFETY 1 EOF - print O "#define USE_INTEGER_DATETIMES 1\n" - if ($self->{options}->{integer_datetimes}); print O "#endif\n"; close(O); } @@ -661,8 +654,6 @@ sub GetFakeConfigure my $cfg = '--enable-thread-safety'; $cfg .= ' --enable-cassert' if ($self->{options}->{asserts}); - $cfg .= ' --enable-integer-datetimes' - if ($self->{options}->{integer_datetimes}); $cfg .= ' --enable-nls' if ($self->{options}->{nls}); $cfg .= ' --enable-tap-tests' if ($self->{options}->{tap_tests}); $cfg .= ' --with-ldap' if ($self->{options}->{ldap}); diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index f046687bd06..97f1af8b49e 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -4,7 +4,6 @@ use warnings; our $config = { asserts => 0, # --enable-cassert - # integer_datetimes=>1, # --enable-integer-datetimes - on is now default # float4byval=>1, # --disable-float4-byval, on by default # float8byval=> $platformbits == 64, # --disable-float8-byval, |