C Shared-Object File

To specify the location of a C shared-object file, you can specify the path to the dynamically-loaded executable file within a quoted pathname or as a variable.

The C shared-object filename is specified by the following syntax:
C Shared-Object File

1  quote
2.1 $environment_var
2.1 /
2.1 .
1 pathname
1?  (symbol)
1 quote
1 $variable
Element Description Restrictions Syntax
environment_var Platform-independent indicator Must begin with a dollar sign ( $ ) Identifier
pathname Pathname to the file See notes that follow this table Must conform to operating system conventions
quote Either single ( ' ) or double ( '' ) quotation mark symbol Opening and closing quotation mark symbols must match Literal symbol (either ' or '')
symbol Entry point to the file Must be enclosed in parentheses Must conform to operating system conventions
variable Platform-independent indicator Must begin with a dollar sign ( $ ) Must conform to C language conventions
The following rules affect pathname and filename specifications in C:
  • A filename (with no pathname) can specify an internal function.
  • You can omit the period ( . ) symbol if pathname is relative to the current directory when the CREATE or ALTER statement is run.
  • On UNIX™, an absolute pathname must begin with a slash ( / ) symbol, and each directory name must end with a slash ( / ) symbol.
  • On Windows™, an absolute pathname must begin with a backslash ( \ ) symbol, and each directory name must end with a backslash ( \ ) symbol.
  • The filename at the end of pathname must have the .so file extension and must refer to an executable file in a shared object library.
  • Use a symbol only if the entry point to the dynamically loadable executable object file has a different name from the UDR that you are registering with CREATE FUNCTION or CREATE PROCEDURE.
  • If you specify a variable, it must contain the full pathname to the executable file.
  • You can include white-space characters, such as blank spaces or tab characters, within a quoted pathname.