diff options
| author | Tom Lane | 2008-04-21 00:26:47 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-04-21 00:26:47 +0000 |
| commit | 8472bf7a73487b0535c95e299773b882f7523463 (patch) | |
| tree | f8cf1ad8529e819aec4d93cdcbf848996f4e3680 /src/bin | |
| parent | be939544a68f852107c912da2f35f5d36958deb2 (diff) | |
Allow float8, int8, and related datatypes to be passed by value on machines
where Datum is 8 bytes wide. Since this will break old-style C functions
(those still using version 0 calling convention) that have arguments or
results of these types, provide a configure option to disable it and retain
the old pass-by-reference behavior. Likewise, provide a configure option
to disable the recently-committed float4 pass-by-value change.
Zoltan Boszormenyi, plus configurability stuff by me.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/pg_controldata/pg_controldata.c | 6 | ||||
| -rw-r--r-- | src/bin/pg_resetxlog/pg_resetxlog.c | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index ea712654d83..122ef37996a 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -6,7 +6,7 @@ * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001; * licence: BSD * - * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.38 2008/03/27 03:57:33 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.39 2008/04/21 00:26:46 tgl Exp $ */ #include "postgres_fe.h" @@ -216,6 +216,10 @@ main(int argc, char *argv[]) ControlFile.toast_max_chunk_size); printf(_("Date/time type storage: %s\n"), (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers"))); + printf(_("Float4 argument passing: %s\n"), + (ControlFile.float4ByVal ? _("by value") : _("by reference"))); + printf(_("Float8 argument passing: %s\n"), + (ControlFile.float8ByVal ? _("by value") : _("by reference"))); printf(_("Maximum length of locale name: %u\n"), ControlFile.localeBuflen); printf(_("LC_COLLATE: %s\n"), diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index 86c4463a2ce..109fec7facf 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.64 2008/02/17 02:09:30 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.65 2008/04/21 00:26:46 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -487,10 +487,12 @@ GuessControlValues(void) ControlFile.indexMaxKeys = INDEX_MAX_KEYS; ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE; #ifdef HAVE_INT64_TIMESTAMP - ControlFile.enableIntTimes = TRUE; + ControlFile.enableIntTimes = true; #else - ControlFile.enableIntTimes = FALSE; + ControlFile.enableIntTimes = false; #endif + ControlFile.float4ByVal = FLOAT4PASSBYVAL; + ControlFile.float8ByVal = FLOAT8PASSBYVAL; ControlFile.localeBuflen = LOCALE_NAME_BUFLEN; localeptr = setlocale(LC_COLLATE, ""); @@ -578,6 +580,10 @@ PrintControlValues(bool guessed) ControlFile.toast_max_chunk_size); printf(_("Date/time type storage: %s\n"), (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers"))); + printf(_("Float4 argument passing: %s\n"), + (ControlFile.float4ByVal ? _("by value") : _("by reference"))); + printf(_("Float8 argument passing: %s\n"), + (ControlFile.float8ByVal ? _("by value") : _("by reference"))); printf(_("Maximum length of locale name: %u\n"), ControlFile.localeBuflen); printf(_("LC_COLLATE: %s\n"), |
