Subject Re: [Firebird-Architect] Database triggers
Author Dmitry Yemanov
Adriano dos Santos Fernandes wrote:
>
> BTW, do people here prefer ON instead of BEFORE/AFTER?

Generally, yes. It would prevent wrong thoughts about possible OLD/NEW
contexts. However, there is one issue. Now we support a non-standard
syntax for triggers: <name> FOR <table> <type>. If we also provide the
standard one as well (there's an appropriate ticket), then it will look
like: <name> <type> ON <table>. Note the ON clause. I'm afraid that your
suggestion may bring some confusion there, e.g. compare:
CREATE TRIGGER TRG ON CONNECT
vs
CREATE TRIGGER TRG BEFORE INSERT ON CONNECTIONS
(where CONNECTIONS is a table)

I don't think it's a major issue, just wanted to pay your attention.
Maybe it would force someone to offer a better syntax :-)


Dmitry