mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Move Trigger and TriggerDesc structs out of rel.h into a new reltrigger.h
This lets us stop including rel.h into execnodes.h, which is a widely used header.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "storage/block.h"
|
||||
#include "storage/relfilenode.h"
|
||||
#include "utils/relcache.h"
|
||||
#include "utils/reltrigger.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -44,60 +45,6 @@ typedef struct LockInfoData
|
||||
|
||||
typedef LockInfoData *LockInfo;
|
||||
|
||||
/*
|
||||
* Likewise, this struct really belongs to trigger.h, but for convenience
|
||||
* we put it here.
|
||||
*/
|
||||
typedef struct Trigger
|
||||
{
|
||||
Oid tgoid; /* OID of trigger (pg_trigger row) */
|
||||
/* Remaining fields are copied from pg_trigger, see pg_trigger.h */
|
||||
char *tgname;
|
||||
Oid tgfoid;
|
||||
int16 tgtype;
|
||||
char tgenabled;
|
||||
bool tgisinternal;
|
||||
Oid tgconstrrelid;
|
||||
Oid tgconstrindid;
|
||||
Oid tgconstraint;
|
||||
bool tgdeferrable;
|
||||
bool tginitdeferred;
|
||||
int16 tgnargs;
|
||||
int16 tgnattr;
|
||||
int16 *tgattr;
|
||||
char **tgargs;
|
||||
char *tgqual;
|
||||
} Trigger;
|
||||
|
||||
typedef struct TriggerDesc
|
||||
{
|
||||
Trigger *triggers; /* array of Trigger structs */
|
||||
int numtriggers; /* number of array entries */
|
||||
|
||||
/*
|
||||
* These flags indicate whether the array contains at least one of each
|
||||
* type of trigger. We use these to skip searching the array if not.
|
||||
*/
|
||||
bool trig_insert_before_row;
|
||||
bool trig_insert_after_row;
|
||||
bool trig_insert_instead_row;
|
||||
bool trig_insert_before_statement;
|
||||
bool trig_insert_after_statement;
|
||||
bool trig_update_before_row;
|
||||
bool trig_update_after_row;
|
||||
bool trig_update_instead_row;
|
||||
bool trig_update_before_statement;
|
||||
bool trig_update_after_statement;
|
||||
bool trig_delete_before_row;
|
||||
bool trig_delete_after_row;
|
||||
bool trig_delete_instead_row;
|
||||
bool trig_delete_before_statement;
|
||||
bool trig_delete_after_statement;
|
||||
/* there are no row-level truncate triggers */
|
||||
bool trig_truncate_before_statement;
|
||||
bool trig_truncate_after_statement;
|
||||
} TriggerDesc;
|
||||
|
||||
|
||||
/*
|
||||
* Cached lookup information for the index access method functions defined
|
||||
|
||||
Reference in New Issue
Block a user