1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

This patch removes a lot of unused code related to assertions and

error handling, and simplifies the code that remains. Apparently,
the code that left Berkeley had a whole "error handling subsystem",
which exceptions and whatnot. Since we don't use that anymore,
there's no reason to keep it around.

The regression tests pass with the patch applied. Unless anyone
sees a problem, please apply.

Neil Conway
This commit is contained in:
Bruce Momjian
2002-08-10 20:29:18 +00:00
parent 8be9bd83ac
commit c5354dff20
11 changed files with 35 additions and 441 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.280 2002/08/06 05:24:04 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.281 2002/08/10 20:29:18 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@ -54,7 +54,6 @@
#include "tcop/pquery.h"
#include "tcop/tcopprot.h"
#include "tcop/utility.h"
#include "utils/exc.h"
#include "utils/guc.h"
#include "utils/memutils.h"
#include "utils/ps_status.h"
@ -1148,7 +1147,6 @@ PostgresMain(int argc, char *argv[], const char *username)
*/
if (!IsUnderPostmaster)
{
EnableExceptionHandling(true);
MemoryContextInit();
}
@ -1676,7 +1674,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
puts("$Revision: 1.280 $ $Date: 2002/08/06 05:24:04 $\n");
puts("$Revision: 1.281 $ $Date: 2002/08/10 20:29:18 $\n");
}
/*
@ -2074,35 +2072,6 @@ ShowUsage(const char *title)
pfree(str.data);
}
#ifdef NOT_USED
static int
assertEnable(int val)
{
assert_enabled = val;
return val;
}
#ifdef ASSERT_CHECKING_TEST
int
assertTest(int val)
{
Assert(val == 0);
if (assert_enabled)
{
/* val != 0 should be trapped by previous Assert */
elog(DEBUG3, "Assert test successful (val = %d)", val);
}
else
elog(DEBUG3, "Assert checking is disabled (val = %d)", val);
return val;
}
#endif
#endif
/* ----------------------------------------------------------------
* CreateCommandTag
*