It should return NIL when no entry is found in the cache, not NULL.

Attached patch fixes that.

Thanks,
Amit
diff --git a/src/backend/utils/cache/evtcache.c 
b/src/backend/utils/cache/evtcache.c
index 54ddc55f76..6faf4ae354 100644
--- a/src/backend/utils/cache/evtcache.c
+++ b/src/backend/utils/cache/evtcache.c
@@ -68,7 +68,7 @@ EventCacheLookup(EventTriggerEvent event)
        if (EventTriggerCacheState != ETCS_VALID)
                BuildEventTriggerCache();
        entry = hash_search(EventTriggerCache, &event, HASH_FIND, NULL);
-       return entry != NULL ? entry->triggerlist : NULL;
+       return entry != NULL ? entry->triggerlist : NIL;
 }
 
 /*
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to