Fix a few small bugs in yesterday's event trigger patch.
Dimitri Fontaine
This commit is contained in:
parent
4c97731928
commit
ddef9a0028
@ -551,7 +551,7 @@ filter_event_trigger(const char **tag, EventTriggerCacheItem *item)
|
||||
}
|
||||
|
||||
/* Filter by tags, if any were specified. */
|
||||
if (item->ntags != 0 && bsearch(&tag, item->tag,
|
||||
if (item->ntags != 0 && bsearch(tag, item->tag,
|
||||
item->ntags, sizeof(char *),
|
||||
pg_qsort_strcmp) == NULL)
|
||||
return false;
|
||||
@ -752,6 +752,9 @@ EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata)
|
||||
ListCell *lc;
|
||||
bool first = true;
|
||||
|
||||
/* Guard against stack overflow due to recursive event trigger */
|
||||
check_stack_depth();
|
||||
|
||||
/*
|
||||
* Let's evaluate event triggers in their own memory context, so
|
||||
* that any leaks get cleaned up promptly.
|
||||
|
Loading…
x
Reference in New Issue
Block a user