operator_precedence_warning
Read PG 13 manual ↗When on, the parser will emit a warning for any construct that might have changed meanings since PostgreSQL 9.4 as a result of changes in operator precedence.
Historical documentation for a PostgreSQL version that is no longer supported.
- Type
- bool
- Context
- user
- Measured default
- off
- Unit
- —
- Metadata snapshot
- 13
Definition PG 13 manual
When on, the parser will emit a warning for any construct that might have changed meanings since PostgreSQL 9.4 as a result of changes in operator precedence. This is useful for auditing applications to see if precedence changes have broken anything; but it is not meant to be kept turned on in production, since it will warn about some perfectly valid, standard-compliant SQL code. The default is off.
See Section 4.1.6 for more information.
Measured default history
| Version interval | Default |
|---|---|
| 9.5 – 13 | off |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Emit a warning for constructs that changed meaning since PostgreSQL 9.4. The parameter still exists in PG13 and is no longer recognized from PG14. PostgreSQL 14 removed the migration warning; rewrite ambiguous expressions with explicit parentheses and test them on the target release.
This emitted migration warnings for expressions whose operator binding changed in PostgreSQL 9.5. It never restored old precedence, and after its removal the durable fix is explicit parentheses plus regression tests.
Before upgrading, inspect default_with_oids, lo_compat_privileges, synchronize_seqscans, remove the old name from configuration, ALTER SYSTEM, role/database settings, and automation templates, and verify the replacement before starting PG14 or later.
Operational considerations
Continuing to emit unknown parameter operator_precedence_warning on PG14+.
Deleting only the setting name without migrating dependent application behavior.
Assuming the historical default equals the replacement mechanism's default.
Missing stale entries in ALTER SYSTEM, role/database settings, or automation templates.
Workload guidance
OLAP: Use the same migration path as OLTP, and also verify long batches, standbys, or large-object/extension workflows; removal of the old switch does not promise identical legacy behavior.
OLTP: Do not tune or continue emitting operator_precedence_warning on PG14+. PostgreSQL 14 removed the migration warning; rewrite ambiguous expressions with explicit parentheses and test them on the target release. Scan every configuration layer and regression-test the application before upgrade.
SMALL: Delete the obsolete setting and adopt the supported replacement directly; do not emulate legacy behavior in scripts without a demonstrated compatibility requirement.
Version history 2
- PG 13 → 14removed
- PG 9.4 → 9.5added
Related entries
Further reading
Definition snapshot: english-manuals:01b92cb70ef8e99fe793b2da7cd… · English manual source