SQLSTATE 0A000 ERROR Class 0A: Feature Not Supported

feature_not_supported WHERE CURRENT OF is not supported for this table type — 0A000

PostgreSQL error "WHERE CURRENT OF is not supported for this table type" (SQLSTATE 0A000): what it means, common causes, and how to fix it.

PG 12, 13, 14, 15, 16, 17, 18 Official docs
Last reviewed May 2025 Grounded in source
Production impact Low Competency Transactions & Isolation Career Pass Senior DBA interviews Frequency Rare

Investigation

Symptoms

A WHERE CURRENT OF cursor clause was used against a table type that doesn’t support it (e.g. a view or foreign table). PostgreSQL raises SQLSTATE 0A000 (feature_not_supported).

  • WHERE CURRENT OF used on an unsupported table type.
  • Cursor-positioned updates require a simple updatable scan.
  • Common with views, foreign tables, or join cursors.

What the server log shows

ERROR:  WHERE CURRENT OF is not supported for this table type

Why PostgreSQL raises this — what the manual says

As the UPDATE reference (Parameters) explains:

WHERE CURRENT OF updates the row at a cursor’s current position, but it is only supported for cursors over ordinary tables — not for views, foreign tables, or similar relation types; rewrite the statement with an explicit WHERE condition on a key column.

WHERE CURRENT OF updates the row the cursor currently points at, which requires the cursor to scan the physical target table directly. View/foreign/join cursors don’t expose a single positionable physical row, so PostgreSQL reports 0A000.

Common causes

  • The cursor is over a view, foreign table, or a join.
  • The cursor query isn’t a simple scan of the update target.
  • The table type doesn’t support cursor positioning.

How to fix it

  1. Open the cursor as a simple SELECT directly on the target table.
  2. Use a primary-key predicate instead of WHERE CURRENT OF.
  3. For foreign tables/views, update by key rather than by cursor position.

Related & next steps

Reference: PostgreSQL 18 — UPDATE.

Keep going

Related & next steps

Concepts on this page

Was this helpful?