Skip to content

operator_precedence_warning

operator_precedence_warning — Emit a warning for constructs that changed meaning since PostgreSQL 9.4. Observed in PG9.5–13; its last measured boot default is off in PG13, with user context. It was removed in PG14.
Note

Fact — official short description: “Emit a warning for constructs that changed meaning since PostgreSQL 9.4.”

Identity

Type , Valuebool
Upstream pg_settings type
Context , Valueuser
Settable by an ordinary user
Unit , Value
Raw unit
Range , Value
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueVersion and Platform Compatibility / Previous PostgreSQL Versions
Upstream classification
Latest boot value , Valueoff
off

Lifecycle

Fact Value
First observed PG9.5
Present in PG9.5–13
Removed in PG14
Introduction commit c6b3c939b7e0 — Make operator precedence follow the SQL standard more closely.
Commit date 2015-03-11
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.5–13 off off

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.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
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.
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.
Small nodes Delete the obsolete setting and adopt the supported replacement directly; do not emulate legacy behavior in scripts without a demonstrated compatibility requirement.

Pigsty

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG13; 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
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.5–13 unmodified; OLAP: PG9.5–13 unmodified; CRIT: PG9.5–13 unmodified; TINY: PG9.5–13 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • 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.

default_with_oids · lo_compat_privileges · synchronize_seqscans · standard_conforming_strings · array_nulls · backslash_quote

References