↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / System Administration Functions

Sets the parameter setting_name to new_value, and returns that value.

Reading PG 18current·documented in 25 of 27 versions, 7.3 to 20

Signatures & examples

set_config ( setting_name text, new_value text, is_local boolean ) → text
Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply during the current transaction. If you want the new value to apply for the rest of the current session, use false instead. This function corresponds to the SQL command SET.
set_config('log_statement_stats', 'off', false) → off
Version history 4
  1. 12 → 13 changed
  2. 7.4 → 8.0 changed
  3. 7.3 → 7.4 changed
  4. 7.2 → 7.3 added

Definition snapshot: b7bd9cda · English manual source