On Thu, Jan 13, 2022 at 8:55 AM Shaozhong SHI <shishaozh...@gmail.com>
wrote:

> That looks interesting.  Is there an excellent example to do the following?
>
>  How to create an event trigger in Postgres? When a user finished loading
> a new table on to it, the trigger can start off an script 10 minutes after
> the event?
>
>
IIUC when an event trigger executes it prevents the DLL (create table in
this example) from committing - so the only thing the event trigger can
meaningfully do is write a record to the database that tells some other
piece of software to do something 10 minutes from now.  You could have a
script execute every minute (say via cron) looking for such a record and
when it finds one, and the time is right, it would do its thing.  Otherwise
it would just stop.

David J.

Reply via email to