select open change scope Open full search

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

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

current_setting

Read PG 18 manual ↗

Returns the current value of the setting setting_name.

Signatures & examples

current_setting ( setting_name text [, missing_ok boolean ] ) → text
Returns the current value of the setting setting_name. If there is no such setting, current_setting throws an error unless missing_ok is supplied and is true (in which case NULL is returned). This function corresponds to the SQL command SHOW.
current_setting('datestyle') → ISO, MDY
Version history 2
  1. PG 12 → 13changed
  2. PG 9.5 → 9.6changed

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source