Subject | Re: [firebird-support] Debugging triggers |
---|---|
Author | Christian Gütter |
Post date | 2004-06-14T16:32:56Z |
Hi Lester,
to test it.
But when the PSQL gets rather complex, it is (IMHO) too cumbersome to
translate all of it to SQL to test it.
With "debugging", I also meant such goodies like breakpoints,
step-by-step execution, watches and so on.
But there seems to be no tool which can do this with triggers.
To me, the only way seems to be to translate the trigger into a stored
procedure.
Christian
> Stored Procedures are a bit more complex but you asked about triggers :)some of my triggers are as complex as SPs ;-)
> The select is just a select statement, which needs to produce theYou are right - it is possible to "emulate" some PSQL stuff in IB_SQL
> correct results and a lot of the sorts of things done in the DO
> statement can now be done with CASE or checking in stages by trying each
> bit. In most cases all they are are convenient ways of doing what you
> can do in simple SQL anyway.
> IB_SQL will only load valid code, and starting with the basic core and
> adding each step is not difficult. Just don't throw everything at it and
> expect it to work ;)
to test it.
But when the PSQL gets rather complex, it is (IMHO) too cumbersome to
translate all of it to SQL to test it.
With "debugging", I also meant such goodies like breakpoints,
step-by-step execution, watches and so on.
But there seems to be no tool which can do this with triggers.
To me, the only way seems to be to translate the trigger into a stored
procedure.
Christian