01P01
PostgreSQLWARNINGNotableWarningHIGH confidence

deprecated feature

What this means

SQLSTATE 01P01 is a Postgres-specific warning raised when a client uses a syntax, function, or feature that is deprecated and scheduled for removal in a future version. The statement still executes but may break on upgrade.

Why it happens
  1. 1Using deprecated SQL syntax or functions that Postgres has marked for removal
  2. 2Using removed GUC parameter names that have been renamed
  3. 3Relying on implicit casts or behaviours that Postgres is phasing out
How to reproduce

Using a deprecated function or syntax.

trigger — this will error
trigger — this will error
-- Example: using deprecated timestamp without timezone implicit coercion
SET standard_conforming_strings = off; -- deprecated in some configurations

expected output

WARNING:  nonstandard use of \\ in a string literal

Fix

Replace deprecated usage with the recommended alternative

WHEN When 01P01 warnings appear in logs, especially before a major version upgrade.

Why this works

Read the Postgres release notes for the version where the deprecation was announced and apply the recommended migration path before upgrading.

What not to do

Ignore 01P01 warnings before a major upgrade

Deprecated features are removed in subsequent major versions, causing failures after upgrade.

Version notes
All major versions

Review the Postgres release notes under "Deprecated Features" for each major version.

Sources
Official documentation ↗

Class 01 — Warning (Postgres-specific)

PostgreSQL Release Notes

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All PostgreSQL errors