17.1. Setting an Option (axe.set_option_*) #

Required privileges: Superuser or the Postgres Pro AXE administrator.

For more information about access management, refer to Chapter 12.

Execute one of the following commands on the Postgres Pro AXE server:

  SELECT axe.set_option_boolean(option_name => 'option_name', option_value => option_value[, schema_name => 'schema_name'][, table_name => 'table_name']);
  SELECT axe.set_option_int(option_name => 'option_name', option_value => option_value[, schema_name => 'schema_name'][, table_name => 'table_name']);
  SELECT axe.set_option_text(option_name => 'option_name', option_value => 'option_value'[, schema_name => 'schema_name'][, table_name => 'table_name']);
  SELECT axe.set_option_time(option_name => 'option_name', option_value => option_value[, schema_name => 'schema_name'][, table_name => 'table_name']);

Where:

  • option_name: The name of the option. For the list of options, refer to Section 17.2.

  • option_value: The value of the option. The stored procedure suffix must match the type of the option value:

    • set_option_boolean: boolean.

    • set_option_int: integer.

    • set_option_text: text.

    • set_option_time: interval (e.g., '1 week', '30 days').

  • schema_name: The name of the schema to which the option applies. Do not specify NULL. If required, omit the parameter instead.

    Optional parameter.

  • table_name: The name of the analytical table to which the option applies. Do not specify NULL. If required, omit the parameter instead.

    Optional parameter. If specified without schema_name, the public schema is used.

How the option value applies depends on which of these parameters you specify:

  • Neither parameter is specified: The option value applies globally, to all schemas and analytical tables.

  • Only schema_name is specified: The option value applies to all analytical tables in this schema.

  • Only table_name is specified: The option value applies to this analytical table in the public schema.

  • Both parameters are specified: The option value applies only to this analytical table in this schema.

Option values set at different levels relate as follows:

  • The option value set for a schema overrides the global value.

  • The option value set for an analytical table overrides the value set for its schema.

  • If the option value is not set, the default value is used.

Postgres Pro AXE will return an error if you specify a nonexistent option, an invalid value, a nonexistent schema, or a nonexistent analytical table.

FAQ