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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Syntax:<br />

Example:<br />

ALTER EXTERNAL FUNCTION funcname<br />

[]<br />

DDL statements<br />

::= ENTRY_POINT 'new-entry-point'<br />

| MODULE_NAME 'new-module-name'<br />

alter external function Phi module_name 'NewUdfLib'<br />

DECLARE FILTER<br />

Available in: DSQL, ESQL<br />

Changed in: 2.0<br />

FILTER<br />

Description: Makes a BLOB filter available to the database.<br />

Syntax:<br />

Example:<br />

DECLARE FILTER filtername<br />

INPUT_TYPE OUTPUT_TYPE <br />

ENTRY_POINT 'function_name' MODULE_NAME 'library_name'<br />

::= number | <br />

::= binary | text | blr | acl | ranges | summary | format<br />

| transaction_description | external_file_description<br />

| user_defined<br />

• In <strong>Firebird</strong> 2 and up, no two BLOB filters in a database may have the same combination of input<br />

and output type. Declaring a filter with an already existing input-output type combination will fail.<br />

Restoring pre-2.0 databases that contain such “duplicate” filters will also fail.<br />

• The possibility to indicate the BLOB types with their mnemonics instead of numbers was added<br />

in <strong>Firebird</strong> 2. The binary mnemonic for subtype 0 was also added in <strong>Firebird</strong> 2. The predefined<br />

mnemonics are case-insensitive.<br />

declare filter Funnel<br />

input_type blr output_type text<br />

entry_point 'blr2asc' module_name 'myfilterlib'<br />

User-defined mnemonics: If you want to define mnemonics for your own BLOB subtypes, you can add them<br />

to the RDB$TYPES system table as shown below. Once committed, the mnemonics can be used in subsequent<br />

filter declarations.<br />

25

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

Saved successfully!

Ooh no, something went wrong!