Subject | Re: [firebird-support] Debugging triggers |
---|---|
Author | Lester Caine |
Post date | 2004-06-14T15:59:59Z |
Christian G|tter wrote:
The select is just a select statement, which needs to produce the
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 ;)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
>>Any particular problem?Stored Procedures are a bit more complex but you asked about triggers :)
>
> I meant it generally.
>
>>I tend to test out the content of a trigger in IB_SQL before committing
>>it to the trigger, and even then I build up in stages. Then I can add
>>records again in IB_SQL and check the results. Crude but quite effective
>>for what I do. Since I can add trigger code via IB_SQL as well it's all
>>fairly well contained :)
>
> But how do you test PSQL statements without putting them into an
> SP/Trigger? One example: how do you test a "FOR SELECT ... DO"
> statement?
The select is just a select statement, which needs to produce the
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 ;)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services