2011/11/10 Tomas Vondra <t...@fuzzy.cz>: > Is there any particular reason why there's not a "backend start hook", > executed right after a backend is initialized? I've tried a very simple > PoC (basically just a new hook definition, called from PostgresMain(), > see the after-logon-hook.diff (and a simple module that uses it is in > logon.c). > > This obviously is not a complete patch or something, but is there a good > reason why this is a stupid idea?
[ catching up on some old email ] I've thought of this before, but I'm not exactly clear on what the use cases are. The particular place where you've put this hook doesn't look right to me. I think it would get re-executed after each ERROR. Also, if you're going to insist that the triggers be written in C (blech!) then there's not much point in including a TRY/CATCH block here. Let the user do that themselves if they are so inclined; it's not free. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers