SQLSTATE 428C9Severity lowLab verified

Incident brief

Cannot insert a non-DEFAULT value into a GENERATED ALWAYS column

An INSERT supplied an explicit value for a GENERATED ALWAYS AS IDENTITY column. PostgreSQL only accepts a user value there when the statement says OVERRIDING SYSTEM VALUE.

Reproduced on PostgreSQL 16.14Verified 2026-07-19 (isolated lab, PostgreSQL 16.14)Reviewed by Verified against PostgreSQL 16.14 in an isolated lab environment

In 10 seconds

What
Cannot insert a non-DEFAULT value into a GENERATED ALWAYS column
What triggers it
Create a table with an id column declared GENERATED ALWAYS AS IDENTITY.
The fix
Omit the identity column from the INSERT and let the sequence assign it.
Proof
Reproduced on PostgreSQL 16.14 → Inserting an explicit id into a GENERATED ALWAYS AS IDENTITY column was rejected with SQLSTATE 428C9. Omitting id and using OVERRIDING SYSTEM VALUE both worked.

The fix

What to do right now

The immediate, application-level response to this error.

  • Omit the identity column from the INSERT and let the sequence assign it.
  • If you truly must supply the value (data migration, backfill), add OVERRIDING SYSTEM VALUE.
  • If the app should normally set the value, declare the column GENERATED BY DEFAULT AS IDENTITY instead of ALWAYS.
Fix — SQL
-- let the identity column assign itself, or override explicitly
INSERT INTO invoices (amount) VALUES (42.00);
INSERT INTO invoices (id, amount) OVERRIDING SYSTEM VALUE VALUES (100, 99.00);

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

PG 16.14
Last verified
2026-07-19 (isolated lab, PostgreSQL 16.14)
Reviewed by
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed