Environment variables

You can include environment variables in the external-name specification of the EXTERNAL NAME clause. These environment variables must be set in the database server environment; that is, they must be set before the database server starts.

For example, the following function registration specifies to evaluate the USERFUNCDIR environment variable when determining the location of the my_func() user-defined function:
CREATE FUNCTION my_func(arg INTEGER)
RETURNING FLOAT
EXTERNAL NAME "$USERFUNCDIR/funcs.udr"
LANGUAGE C;