1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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
This commit is contained in:
Jan Wieck
1999-09-29 16:06:40 +00:00
parent d810338d29
commit 1547ee017c
20 changed files with 1473 additions and 245 deletions

View File

@ -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();
}