diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 1999-09-29 16:06:40 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 1999-09-29 16:06:40 +0000 |
commit | 1547ee017c897725221d0752af4477121524c05b (patch) | |
tree | 775616278865cba3e01e521812d045489e40fd9b /src/backend/tcop/postgres.c | |
parent | d810338d29bff178101e72c810c9dcfa3223c6c0 (diff) | |
download | postgresql-1547ee017c897725221d0752af4477121524c05b.tar.gz postgresql-1547ee017c897725221d0752af4477121524c05b.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 18 |
1 files changed, 16 insertions, 2 deletions
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,10 +1485,17 @@ 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 * * if an exception is encountered, processing resumes 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(); } |