Firebird 2.1 Language Reference Update
Firebird 2.1 Language Reference Update
Firebird 2.1 Language Reference Update
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
DDL statements<br />
• TRANSACTION triggers are executed within the transaction whose opening, committing or rolling-back<br />
evokes them. The actions taken after an uncaught exception depend on the type:<br />
- In a START trigger, the exception is reported to the client and the transaction is rolled back.<br />
- In a COMMIT trigger, the exception is reported, the trigger's actions so far are undone and the commit<br />
is canceled.<br />
- In a ROLLBACK trigger, the exception is not reported and the transaction is rolled back as foreseen.<br />
• It follows from the above that there is no direct way of knowing if a DISCONNECT or TRANSACTION ROLL-<br />
BACK trigger caused an exception.<br />
• It also follows that you can't connect to a database if a CONNECT trigger causes an exception, and that you<br />
can't start a transaction if a TRANSACTION START trigger does so. Both phenomena effectively lock you<br />
out of your database while you need to get in there to fix the problem. See the note below for a way around<br />
this Catch-22 situation.<br />
• In the case of a two-phase commit, TRANSACTION COMMIT triggers fire in the prepare, not the commit<br />
phase.<br />
Note<br />
Some <strong>Firebird</strong> command-line tools have been supplied with new switches to suppress the automatic firing of<br />
database triggers:<br />
gbak -nodbtriggers<br />
isql -nodbtriggers<br />
nbackup -T<br />
These switches can only be used by the database owner and SYSDBA.<br />
Domains instead of datatypes<br />
Changed in: <strong>2.1</strong><br />
Description: <strong>Firebird</strong> <strong>2.1</strong> and up allow the use of domains instead of SQL datatypes when declaring local trigger<br />
variables. See PSQL::DECLARE for the exact syntax and details.<br />
COLLATE in variable declarations<br />
Changed in: <strong>2.1</strong><br />
Description: <strong>Firebird</strong> <strong>2.1</strong> and up allow COLLATE clauses in local variable declarations. See PSQL::DECLARE<br />
for syntax and details.<br />
NOT NULL in variable declarations<br />
Changed in: <strong>2.1</strong><br />
Description: <strong>Firebird</strong> <strong>2.1</strong> and up allow NOT NULL constraints in local variable declarations. See<br />
PSQL::DECLARE for syntax and details.<br />
48