mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.80 1999/09/28 04:34:50 momjian Exp $
|
||||
* $Id: parsenodes.h,v 1.81 1999/09/29 16:06:23 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -180,6 +180,13 @@ typedef struct CreateTrigStmt
|
||||
char *text; /* AS 'text' */
|
||||
List *attr; /* UPDATE OF a, b,... (NI) or NULL */
|
||||
char *when; /* WHEN 'a > 10 ...' (NI) or NULL */
|
||||
|
||||
/* The following are used for referential */
|
||||
/* integrity constraint triggers */
|
||||
bool isconstraint; /* This is an RI trigger */
|
||||
bool deferrable; /* [NOT] DEFERRABLE */
|
||||
bool initdeferred; /* INITIALLY {DEFERRED|IMMEDIATE} */
|
||||
char *constrrelname; /* opposite relation */
|
||||
} CreateTrigStmt;
|
||||
|
||||
typedef struct DropTrigStmt
|
||||
@@ -602,6 +609,19 @@ typedef struct LockStmt
|
||||
int mode; /* lock mode */
|
||||
} LockStmt;
|
||||
|
||||
|
||||
/* ----------------------
|
||||
* SET CONSTRAINTS Statement
|
||||
* ----------------------
|
||||
*/
|
||||
typedef struct ConstraintsSetStmt
|
||||
{
|
||||
NodeTag type;
|
||||
List *constraints;
|
||||
bool deferred;
|
||||
} ConstraintsSetStmt;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Optimizable Statements
|
||||
*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user