Hi, Savita! On Mar 08, Savita Agrawal wrote:
what is the difference between a trigger and user defined event?
A main difference: a trigger is automatially run by DBMS when something happens. User defined event - you need to wait for it, it's more procedural programming.
In postgres there is a clear distintion between trigger and event trigger. Triggers are activated when DML statements are executed whereas event triggers are activated when DDL statements are executed.
No, that's unrelated.
But in soliddb (from which our post in JIRA page is inspired), it seems like user defined events can be activated for DML statements. What is it that can't be done with triggers and can be done with user defined event?
Waiting for something to happen. You cannot wait with a trigger.
Why is the restriction that events can only be posted and received by stored procedures only?
I'd say, events can be posted from anywhere, not only a stored procedure. But received - yes, only there, because we don't support compund statements outside of a stored routine yet. Regards, Sergei