On Thu, Oct 5, 2023 at 11:11 PM Jon Erdman <j...@thewickedtribe.net> wrote: > > As a second more general question: could my original idea (i.e. sans > event trigger) be implemented in an extension somehow, or is that not > technically possible (I suspect not)?
It should be easy to do using the ProcessUtility_hook hook, defined in a custom module written in C. As long as your module is preloaded (one of the *_preload_libraries GUC), your code will be called without the need for any SQL-level object and you would be free to add any custom GUC you want to enable it on a per-user basis or anything else.