From 1547ee017c897725221d0752af4477121524c05b Mon Sep 17 00:00:00 2001 From: Jan Wieck Date: Wed, 29 Sep 1999 16:06:40 +0000 Subject: This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support. Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan --- src/backend/tcop/postgres.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 4947b291375..2a3e7e77300 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.129 1999/09/24 00:24:52 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.130 1999/09/29 16:06:10 wieck Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -44,6 +44,7 @@ #endif #include "commands/async.h" +#include "commands/trigger.h" #include "libpq/libpq.h" #include "libpq/pqformat.h" #include "libpq/pqsignal.h" @@ -1484,9 +1485,16 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.129 $ $Date: 1999/09/24 00:24:52 $\n"); + puts("$Revision: 1.130 $ $Date: 1999/09/29 16:06:10 $\n"); } + /* ---------------- + * Initialize the deferred trigger manager + * ---------------- + */ + if (DeferredTriggerInit() != 0) + ExitPostgres(1); + /* ---------------- * POSTGRES main processing loop begins here * @@ -1609,6 +1617,12 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) pg_exec_query(parser_input->data); + /* + * Invoke IMMEDIATE constraint triggers + * + */ + DeferredTriggerEndQuery(); + if (ShowStats) ShowUsage(); } -- cgit v1.2.3