Configuration parameter

quote_all_identifiers — PostgreSQL configuration parameter

Category Version and Platform Compatibility

When the database generates SQL, force all identifiers to be quoted, even if they are not (currently) keywords.

At a glance

Property Value
Parameter quote_all_identifiers
Category Version and Platform Compatibility
Default (see documentation)
Value type boolean (on/off)
Change scope Per-session (SET)
Available in PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12)

What it does

When the database generates SQL, force all identifiers to be quoted, even if they are not (currently) keywords. This will affect the output of EXPLAIN as well as the results of functions like pg_get_viewdef. See also the –quote-all-identifiers option of app_pgdump and app_pg_dumpall.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW quote_all_identifiers; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'quote_all_identifiers';.

Tuning guidance

This controls backward-compatibility behaviour, not performance. Keep it at the modern default unless a specific legacy application depends on the older behaviour; turning compatibility flags on to paper over application bugs stores up problems for a future upgrade. Treat any non-default value as technical debt to remove.

Reference

PostgreSQL documentation — quote_all_identifiers.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters