FirebirdSQL logo

Transactions

Stored procedures and functions (including those defined in packages) are executed in the context of the transaction in which they are called.Triggers are executed as an intrinsic part of the operation of the DML statement: thus, their execution is within the same transaction context as the statement itself.Individual transactions are launched for database event triggers fired on connect or disconnect.

Statements that start and end transactions are not available in PSQL, but it is possible to run a statement or a block of statements in an autonomous transaction.

Module Structure

PSQL code modules consist of a header and a body.The DDL statements for defining them are complex statements;that is, they consist of a single statement that encloses blocks of multiple statements.These statements begin with a verb (CREATE, ALTER, DROP, RECREATE, CREATE OR ALTER, or EXECUTE BLOCK) and end with the last END statement of the body.