Skip to content

Commit ddef9a0

Browse files
committed
Fix a few small bugs in yesterday's event trigger patch.
Dimitri Fontaine
1 parent 4c97731 commit ddef9a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/commands/event_trigger.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ filter_event_trigger(const char **tag, EventTriggerCacheItem *item)
551551
}
552552

553553
/* Filter by tags, if any were specified. */
554-
if (item->ntags != 0 && bsearch(&tag, item->tag,
554+
if (item->ntags != 0 && bsearch(tag, item->tag,
555555
item->ntags, sizeof(char *),
556556
pg_qsort_strcmp) == NULL)
557557
return false;
@@ -752,6 +752,9 @@ EventTriggerInvoke(List *fn_oid_list, EventTriggerData *trigdata)
752752
ListCell *lc;
753753
bool first = true;
754754

755+
/* Guard against stack overflow due to recursive event trigger */
756+
check_stack_depth();
757+
755758
/*
756759
* Let's evaluate event triggers in their own memory context, so
757760
* that any leaks get cleaned up promptly.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy