MCPcopy Create free account
hub / github.com/apache/cloudberry / FindTriggerIncompatibleWithInheritance

Function FindTriggerIncompatibleWithInheritance

src/backend/commands/trigger.c:2150–2167  ·  view source on GitHub ↗

* Check if there is a row-level trigger with transition tables that prevents * a table from becoming an inheritance child or partition. Return the name * of the first such incompatible trigger, or NULL if there is none. */

Source from the content-addressed store, hash-verified

2148 * of the first such incompatible trigger, or NULL if there is none.
2149 */
2150const char *
2151FindTriggerIncompatibleWithInheritance(TriggerDesc *trigdesc)
2152{
2153 if (trigdesc != NULL)
2154 {
2155 int i;
2156
2157 for (i = 0; i < trigdesc->numtriggers; ++i)
2158 {
2159 Trigger *trigger = &trigdesc->triggers[i];
2160
2161 if (trigger->tgoldtable != NULL || trigger->tgnewtable != NULL)
2162 return trigger->tgname;
2163 }
2164 }
2165
2166 return NULL;
2167}
2168
2169/*
2170 * Call a trigger function.

Callers 2

ATExecAddInheritFunction · 0.85
ATExecAttachPartitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected