cannot insert into view “…”

SQLSTATE 0A000 condition feature_not_supported class 0A — Feature Not Supported severity ERROR
Reproduced & verified on PostgreSQL 14.23, 15.18, 16.14, 17.10 and 18.4 — identical message on every version.
Last reviewed 11 Jun 2026 · Reproduced live with the SQL on this page.

Symptoms

An INSERT targeted a view that is not automatically updatable and has no INSTEAD OF trigger or rule. PostgreSQL raises SQLSTATE 0A000 (feature_not_supported).

What the server log shows

ERROR:  cannot insert into view "order_summary"
DETAIL:  Views containing GROUP BY are not automatically updatable.
HINT:  To enable inserting into the view, provide an INSTEAD OF INSERT trigger or an unconditional ON INSERT DO INSTEAD rule.

Why PostgreSQL raises this — what the manual says

the CREATE VIEW reference (Updatable Views):

“A more complex view that does not satisfy all these conditions is read-only by default: the system will not allow an INSERT, UPDATE, DELETE, or MERGE on the view.”

PostgreSQL can auto-translate writes only for simple views. A view using aggregation, DISTINCT, GROUP BY, joins, etc. has no unambiguous mapping back to base rows, so without an INSTEAD OF trigger/rule the write is unsupported (0A000).

Common causes

How to fix it

  1. Add an INSTEAD OF INSERT trigger that writes to base tables.
  2. Define an unconditional ON INSERT DO INSTEAD rule.
  3. Insert directly into the underlying base table.

Related & next steps

Reference: PostgreSQL 18 — CREATE VIEW.