Understanding external libraries

Sybase IQ can use external pre-filter and term-breaker libraries written in C or C++ to prefilter and tokenize the documents during index creation or query processing. These libraries can be dynamically loaded into the process space of the database server.

NoteExternal pre-filter and term-breaker libraries must be provided by a Sybase-certified partner. For a information on certified vendor solutions, see the Partner Certification Reports web site and then filter the certification reports to show Sybase IQ certifications

The external dynamically loadable pre-filter and term-breaker libraries are specified in the text configuration, and need to be loaded by the database server. Each library contains an exported symbol that implements the external function specified in the text configuration object. This function returns a set of function descriptors that are used by the caller to perform the necessary tasks.

The external pre-filter and term-breaker libraries are loaded by the database server with the first CREATE TEXT INDEX request, when a query for a given column is received that requires the library to be loaded, or when the TEXT index needs to be updated.

The libraries are not loaded when an ALTER TEXT CONFIGURATION call is made, nor are they automatically unloaded when a DROP TEXT CONFIGURATION call is made. The external pre-filter and term-breaker libraries are not loaded if the server is started with the startup option to disallow the loading of external libraries.

Because these external C/C++ libraries involve the loading of non-server library code into the process space of the server, there are potential risks to data integrity, data security, and server robustness from poorly or maliciously written functions. To manage these risks, each Sybase IQ server can explicitly enable or disable this functionality. See “Enabling and disabling external libraries on startup”.

The ISYSTEXTCONFIG system table stores information about the external libraries associated with a text configuration object. See “SYSTEXTCONFIG system view” in Chapter 8, “System Tables and Views” of Reference: Building Blocks, Tables, and Procedures.