DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Version and Platform Compatibility / Previous PostgreSQL Versions

quote_all_identifiers

When generating SQL fragments, quote all identifiers.

  • Default: off
  • Type: bool
  • Applies: Session (any user)

In plain words

When PostgreSQL turns objects back into SQL text (view definitions, EXPLAIN output, quote_ident(), format('%I')), it normally adds double quotes only where needed. With this setting on, every identifier is quoted. Useful when the output will be loaded into a future version where today's ordinary word may become a reserved keyword.

For DBAs and operators

Verified on 18.6: with the setting on, format('%I', 'abc') and quote_ident('abc') both return "abc", and pg_get_viewdef() quotes column names.

pg_dump and pg_dumpall have a matching --quote-all-identifiers option, which sets this for their session. That is recommended when the dump is restored into a different major version, because a column named after a word that becomes reserved later would otherwise break the restore.

Harmless but noisy for interactive use. It does not change how your own SQL is parsed.

How to change it

Any user can change it for their session with SET.

Related parameters

standard_conforming_strings

All Version and Platform Compatibility parameters