Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes16kdownloads
reltrigger.h82 linesDownload Raw Back to utils
1/*-------------------------------------------------------------------------2 *3 * reltrigger.h4 *	  POSTGRES relation trigger definitions.5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/utils/reltrigger.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef RELTRIGGER_H15#define RELTRIGGER_H16 17 18/*19 * These struct really belongs to trigger.h, but we put it separately so that20 * it can be cleanly included in rel.h and other places.21 */22 23typedef struct Trigger24{25	Oid			tgoid;			/* OID of trigger (pg_trigger row) */26	/* Remaining fields are copied from pg_trigger, see pg_trigger.h */27	char	   *tgname;28	Oid			tgfoid;29	int16		tgtype;30	char		tgenabled;31	bool		tgisinternal;32	bool		tgisclone;33	Oid			tgconstrrelid;34	Oid			tgconstrindid;35	Oid			tgconstraint;36	bool		tgdeferrable;37	bool		tginitdeferred;38	int16		tgnargs;39	int16		tgnattr;40	int16	   *tgattr;41	char	  **tgargs;42	char	   *tgqual;43	char	   *tgoldtable;44	char	   *tgnewtable;45} Trigger;46 47typedef struct TriggerDesc48{49	Trigger    *triggers;		/* array of Trigger structs */50	int			numtriggers;	/* number of array entries */51 52	/*53	 * These flags indicate whether the array contains at least one of each54	 * type of trigger.  We use these to skip searching the array if not.55	 */56	bool		trig_insert_before_row;57	bool		trig_insert_after_row;58	bool		trig_insert_instead_row;59	bool		trig_insert_before_statement;60	bool		trig_insert_after_statement;61	bool		trig_update_before_row;62	bool		trig_update_after_row;63	bool		trig_update_instead_row;64	bool		trig_update_before_statement;65	bool		trig_update_after_statement;66	bool		trig_delete_before_row;67	bool		trig_delete_after_row;68	bool		trig_delete_instead_row;69	bool		trig_delete_before_statement;70	bool		trig_delete_after_statement;71	/* there are no row-level truncate triggers */72	bool		trig_truncate_before_statement;73	bool		trig_truncate_after_statement;74	/* Is there at least one trigger specifying each transition relation? */75	bool		trig_insert_new_table;76	bool		trig_update_old_table;77	bool		trig_update_new_table;78	bool		trig_delete_old_table;79} TriggerDesc;80 81#endif							/* RELTRIGGER_H */82 
codekingpro/portable-devtools · Team Ai