Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ca45d5

Browse files
committed
Function prototypes.
1 parent38f0ffd commit2ca45d5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

‎src/include/commands/trigger.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,45 @@
99
#ifndefTRIGGER_H
1010
#defineTRIGGER_H
1111

12+
#include"access/tupdesc.h"
13+
#include"access/htup.h"
14+
#include"utils/rel.h"
15+
16+
typedefuint32TriggerAction;
17+
18+
#defineTRIGGER_ACTION_INSERT0x00000000
19+
#defineTRIGGER_ACTION_DELETE0x00000001
20+
#defineTRIGGER_ACTION_UPDATE0x00000010
21+
#defineTRIGGER_ACTION_OPMASK0x00000011
22+
#defineTRIGGER_ACTION_ROW4
23+
24+
#defineTRIGGER_FIRED_BY_INSERT (action)\
25+
(((TriggerAction) action & TRIGGER_ACTION_OPMASK) == \
26+
TRIGGER_ACTION_INSERT)
27+
28+
#defineTRIGGER_FIRED_BY_DELETE (action)\
29+
(((TriggerAction) action & TRIGGER_ACTION_OPMASK) == \
30+
TRIGGER_ACTION_DELETE)
31+
32+
#defineTRIGGER_FIRED_BY_UPDATE (action)\
33+
(((TriggerAction) action & TRIGGER_ACTION_OPMASK) == \
34+
TRIGGER_ACTION_UPDATE)
35+
36+
#defineTRIGGER_FIRED_FOR_ROW (action)\
37+
((TriggerAction) action & TRIGGER_ACTION_ROW)
38+
39+
#defineTRIGGER_FIRED_FOR_STATEMENT (action)\
40+
(!TRIGGER_FIRED_FOR_ROW (action))
41+
42+
1243
externvoidCreateTrigger (CreateTrigStmt*stmt);
1344
externvoidDropTrigger (DropTrigStmt*stmt);
1445

46+
externHeapTupleExecBRInsertTriggers (Relationrel,HeapTupletuple);
47+
externvoidExecARInsertTriggers (Relationrel,HeapTupletuple);
48+
externboolExecBRDeleteTriggers (Relationrel,ItemPointertupleid);
49+
externvoidExecARDeleteTriggers (Relationrel,ItemPointertupleid);
50+
externHeapTupleExecBRUpdateTriggers (Relationrel,ItemPointertupleid,HeapTupletuple);
51+
externvoidExecARUpdateTriggers (Relationrel,ItemPointertupleid,HeapTupletuple);
52+
1553
#endif/* TRIGGER_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp