{"Entry":{"collection":"guc","key":"quote_all_identifiers","name":"quote_all_identifiers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Version and Platform Compatibility / Previous PostgreSQL Versions","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.0","status":"added","to":"9.1"}],"content_hash":"acdbf791b5998dde9ce70ab6a66ea75868a12bf62d0fb4809334dfb4be3c2526","context":"","default_changed_in":[],"default_history":[{"from":"9.1","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Regression-test ETL, generated SQL, and old drivers, where parsing/quoting assumptions hide. Performance is rarely a reason to change this switch.","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.","small":"Keep the default without a legacy requirement. If temporarily enabled, record owner, affected connections, and a removal date."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: quote_all_identifiers","url":"https://www.postgresql.org/docs/19/runtime-config-compatible.html#GUC-QUOTE-ALL-IDENTIFIERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["array_nulls","backslash_quote","escape_string_warning","standard_conforming_strings","transform_null_equals","default_with_oids"],"summary":"quote_all_identifiers — When generating SQL fragments, quote all identifiers. Observed in PG9.1–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"9.1","group":"Version and Platform Compatibility","group_slug":"compatible","imported_at":"2026-09-27T17:57:31.851714+08:00","intro_commit":{"authored_at":"2010-07-22T01:22:35Z","discussion":[],"hash":"ce68df468a41d8dbb992184aad490c07d02ca721","subject":"Add options to force quoting of all identifiers.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=ce68df468a41d8dbb992184aad490c07d02ca721"},"key":"quote_all_identifiers","last_version":"20","max_val":"","min_val":"","name":"quote_all_identifiers","position":319,"present_in":["9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"When the database generates SQL, force all identifiers to be quoted, even if they are not (currently) keywords.","short_desc_zh":"","source_rev":"english-manuals:fae78ec5de8c492f914e8521102c1ab7654610354b8f2ac0eb2cfaebe4320763","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"quote_all_identifiers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"quote_all_identifiers","SourceRevision":"english-manuals:fae78ec5de8c492f914e8521102c1ab7654610354b8f2ac0eb2cfaebe4320763","Facts":{"boot_val":"off","category":"Version and Platform Compatibility / Previous PostgreSQL Versions","context":"user","description":"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 pg_dump and pg_dumpall.","doc":{"anchor":"GUC-QUOTE-ALL-IDENTIFIERS","file":"runtime-config-compatible.html","lang":"en","sha256":"db2ecac1e62738d66a4932f4c8197976a349bcbf261c5b90fff740bc44867b8b","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"quote_all_identifiers","short_desc":"When generating SQL fragments, quote all identifiers.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-QUOTE-ALL-IDENTIFIERS","file":"runtime-config-compatible.html","lang":"en","sha256":"db2ecac1e62738d66a4932f4c8197976a349bcbf261c5b90fff740bc44867b8b","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"quote_all_identifiers","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"quote_all_identifiers","Summary":"","BodyHTML":"\u003cp\u003e当数据库产生 SQL 时，强制所有标识符被引号包围，即使它们（当前）不是关键字。这将影响\u003ccode\u003eEXPLAIN\u003c/code\u003e的输出以及\u003ccode\u003epg_get_viewdef\u003c/code\u003e等函数的结果。另请参阅\u003ca href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\" rel=\"nofollow\"\u003e\u003cspan\u003e\u003cspan\u003epg_dump\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/app-pg-dumpall.html\" title=\"pg_dumpall\" rel=\"nofollow\"\u003e\u003cspan\u003e\u003cspan\u003epg_dumpall\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e的\u003ccode\u003e--quote-all-identifiers\u003c/code\u003e选项。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"dcde2430a7c308c1e2ee106c8e3b190eb4f2325b2226a846a82eab8a991350be","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e当数据库产生 SQL 时，强制所有标识符被引号包围，即使它们（当前）不是关键字。这将影响\u003ccode class=\"command\"\u003eEXPLAIN\u003c/code\u003e的输出以及\u003ccode class=\"function\"\u003epg_get_viewdef\u003c/code\u003e等函数的结果。另请参阅\u003ca href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\"\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_dump\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e和\u003ca href=\"/docs/18/app-pg-dumpall.html\" title=\"pg_dumpall\"\u003e\u003cspan class=\"refentrytitle\"\u003e\u003cspan class=\"application\"\u003epg_dumpall\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e的\u003ccode class=\"option\"\u003e--quote-all-identifiers\u003c/code\u003e选项。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
