Re: On login trigger: take three
От | Zhihong Yu |
---|---|
Тема | Re: On login trigger: take three |
Дата | |
Msg-id | CALNJ-vTEH3tbfysyijg8M0m29T5g2u14TUAdvZwOzpLgO+bweQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: On login trigger: take three (Daniel Gustafsson <daniel@yesql.se>) |
Список | pgsql-hackers |
On Fri, Sep 2, 2022 at 8:37 AM Daniel Gustafsson <daniel@yesql.se> wrote:
This had bitrotted a fair bit, attached is a rebase along with (mostly)
documentation fixes. 0001 adds a generic GUC for ignoring event triggers and
0002 adds the login event with event trigger support, and hooks it up to the
GUC such that broken triggers wont require single-user mode. Moving the CF
entry back to Needs Review.
--
Daniel Gustafsson https://vmware.com/
Hi,
For EventTriggerOnLogin():
+
+ tuple = SearchSysCacheCopy1(DATABASEOID, ObjectIdGetDatum(MyDatabaseId));
+
+ if (!HeapTupleIsValid(tuple))
+ elog(ERROR, "cache lookup failed for database %u", MyDatabaseId);
Should the lock be taken after the check (HeapTupleIsValid) is done ?
Cheers
В списке pgsql-hackers по дате отправления: