diff options
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index bb8f3d4761f..33c912ebaa4 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.297 2008/04/16 23:59:40 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.298 2008/04/21 00:26:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3791,10 +3791,12 @@ WriteControlFile(void) 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, NULL); @@ -4000,14 +4002,14 @@ ReadControlFile(void) errhint("It looks like you need to recompile or initdb."))); #ifdef HAVE_INT64_TIMESTAMP - if (ControlFile->enableIntTimes != TRUE) + if (ControlFile->enableIntTimes != true) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized without HAVE_INT64_TIMESTAMP" " but the server was compiled with HAVE_INT64_TIMESTAMP."), errhint("It looks like you need to recompile or initdb."))); #else - if (ControlFile->enableIntTimes != FALSE) + if (ControlFile->enableIntTimes != false) ereport(FATAL, (errmsg("database files are incompatible with server"), errdetail("The database cluster was initialized with HAVE_INT64_TIMESTAMP" @@ -4015,6 +4017,38 @@ ReadControlFile(void) errhint("It looks like you need to recompile or initdb."))); #endif +#ifdef USE_FLOAT4_BYVAL + if (ControlFile->float4ByVal != true) + ereport(FATAL, + (errmsg("database files are incompatible with server"), + errdetail("The database cluster was initialized without USE_FLOAT4_BYVAL" + " but the server was compiled with USE_FLOAT4_BYVAL."), + errhint("It looks like you need to recompile or initdb."))); +#else + if (ControlFile->float4ByVal != false) + ereport(FATAL, + (errmsg("database files are incompatible with server"), + errdetail("The database cluster was initialized with USE_FLOAT4_BYVAL" + " but the server was compiled without USE_FLOAT4_BYVAL."), + errhint("It looks like you need to recompile or initdb."))); +#endif + +#ifdef USE_FLOAT8_BYVAL + if (ControlFile->float8ByVal != true) + ereport(FATAL, + (errmsg("database files are incompatible with server"), + errdetail("The database cluster was initialized without USE_FLOAT8_BYVAL" + " but the server was compiled with USE_FLOAT8_BYVAL."), + errhint("It looks like you need to recompile or initdb."))); +#else + if (ControlFile->float8ByVal != false) + ereport(FATAL, + (errmsg("database files are incompatible with server"), + errdetail("The database cluster was initialized with USE_FLOAT8_BYVAL" + " but the server was compiled without USE_FLOAT8_BYVAL."), + errhint("It looks like you need to recompile or initdb."))); +#endif + if (ControlFile->localeBuflen != LOCALE_NAME_BUFLEN) ereport(FATAL, (errmsg("database files are incompatible with server"), |