21.10.2013 Views

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

Firebird 2.1 Language Reference Update

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example:<br />

DDL statements<br />

create exception Ex_TooManyManagers<br />

'Too many managers: An attempt was made to create more managers than the<br />

maximum defined in the Limits table. If you really need to create more<br />

managers than you have now, raise the limit first. However, please consult<br />

your department''s manager before doing so. Otherwise, your decision may<br />

be overturned later and the additional manager(s) removed.'<br />

Note<br />

The maximum exception message length depends on a certain system table field. Therefore, pre-2.0 databases<br />

need to be backed up and restored under <strong>Firebird</strong> 2.x before they can store exception messages of up to 1021<br />

bytes.<br />

CREATE OR ALTER EXCEPTION<br />

Available in: DSQL<br />

Added in: 2.0<br />

Description: If the exception does not yet exist, it is created just as if CREATE EXCEPTION were used. If it<br />

already exists, it is altered. Existing dependencies are preserved.<br />

Syntax: Exactly the same as for CREATE EXCEPTION.<br />

RECREATE EXCEPTION<br />

Available in: DSQL<br />

Added in: 2.0<br />

Description: Creates or recreates an exception. If an exception with the same name already exists, RECREATE<br />

EXCEPTION will try to drop it and create a new exception. This wlll fail if there are existing dependencies on<br />

the exception.<br />

Syntax: Exactly the same as CREATE EXCEPTION.<br />

Note<br />

If you use RECREATE EXCEPTION on an exception that has dependent objects, you may not get an error<br />

message until you try to commit your transaction.<br />

DECLARE EXTERNAL FUNCTION<br />

Available in: DSQL, ESQL<br />

EXTERNAL FUNCTION<br />

23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!