This page in other versions: 9.1 / 9.2 / 9.3 / 9.4 / current (9.5)  |  Development versions: devel / 9.6  |  Unsupported versions: 8.1 / 8.2 / 8.3 / 8.4 / 9.0

17.14. Customized Options

This feature was designed to allow options not normally known to PostgreSQL to be added by add-on modules (such as procedural languages). This allows add-on modules to be configured in the standard ways.

custom_variable_classes (string)

This variable specifies one or several class names to be used for custom variables, in the form of a comma-separated list. A custom variable is a variable not normally known to PostgreSQL proper but used by some add-on module. Such variables must have names consisting of a class name, a dot, and a variable name. custom_variable_classes specifies all the class names in use in a particular installation. This option can be set at server start or in the postgresql.conf configuration file.

The difficulty with setting custom variables in postgresql.conf is that the file must be read before add-on modules have been loaded, and so custom variables would ordinarily be rejected as unknown. When custom_variable_classes is set, the server will accept definitions of arbitrary variables within each specified class. These variables will be treated as placeholders and will have no function until the module that defines them is loaded. When a module for a specific class is loaded, it will add the proper variable definitions for its class name, convert any placeholder values according to those definitions, and issue warnings for any placeholders of its class that remain (which presumably would be misspelled configuration variables).

Here is an example of what postgresql.conf might contain when using custom variables:

custom_variable_classes = 'plr,plperl'
plr.path = '/usr/lib/R'
plperl.use_strict = true
plruby.use_strict = true        # generates error: unknown class name

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.

Privacy Policy | About PostgreSQL
Copyright © 1996-2016 The PostgreSQL Global Development Group