quote_all_identifiers
Fact — official short description: “When generating SQL fragments, quote all identifiers.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.1 |
| Present in | PG9.1–19 Beta 3 |
| Removed in | No |
| Introduction commit | ce68df468a41 — Add options to force quoting of all identifiers. |
| Commit date | 2010-07-22 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.1–19 Beta 3 | off |
— | off |
How it works
When generating SQL fragments, quote all identifiers. It can be changed at session scope, so different sessions may observe different behavior.
This asks server-side SQL deparsers to double-quote every identifier instead of only those that require quoting. It helps transport SQL across keyword/version differences but does not quote values or make arbitrary string concatenation safe.
Monitor and change quote_all_identifiers together with array_nulls, backslash_quote, escape_string_warning. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the modern default and repair legacy clients/SQL that depend on quote_all_identifiers. Test migration at session scope first; do not make a compatibility switch permanent cluster policy. |
| OLAP | Regression-test ETL, generated SQL, and old drivers, where parsing/quoting assumptions hide. Performance is rarely a reason to change this switch. |
| Small nodes | Keep the default without a legacy requirement. If temporarily enabled, record owner, affected connections, and a removal date. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.1–19 Beta 3 unmodified; OLAP: PG9.1–19 Beta 3 unmodified; CRIT: PG9.1–19 Beta 3 unmodified; TINY: PG9.1–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Keeping a compatibility switch permanently instead of fixing the client.
- Testing in one session and deploying globally to unrelated applications.
- Confusing parsing compatibility with data or security compatibility.
- Forgetting to remove an override after the upgrade migration is complete.
Related parameters
array_nulls · backslash_quote · escape_string_warning · standard_conforming_strings · transform_null_equals · default_with_oids
References
- PostgreSQL 19 Beta 3 — quote_all_identifiers
- PostgreSQL 19 release notes
- Machine-readable GUC export