virtual generated column “…” cannot have a user-defined type
Symptoms
A statement failed with SQLSTATE 0A000 (feature_not_supported), reported at severity ERROR. This is a Feature Not Supported condition: PostgreSQL emits the message virtual generated column "…" cannot have a user-defined type.
- The client receives SQLSTATE
0A000(feature not supported). - The operation is rejected at
ERRORlevel; the statement does not complete. - The server adds a
DETAILline with specifics (see below).
What the server log shows
ERROR: virtual generated column "…" cannot have a user-defined type
DETAIL: Virtual generated columns that make use of user-defined types are not yet supported.
Why PostgreSQL raises this
Class 0A (Feature Not Supported) means the statement was syntactically valid but asked for an operation this server does not implement, or that is not allowed in the current context.
As described in PostgreSQL’s Appendix A PostgreSQL Error Codes, SQLSTATE 0A000 carries the condition name feature_not_supported in class Feature Not Supported. (Paraphrased — see the linked reference for the exact wording.)
Common causes
- Using a SQL feature or option not implemented by this PostgreSQL version.
- Attempting an operation disallowed in the current context (e.g. inside a transaction block).
- Combining clauses that PostgreSQL does not support together.
How to fix it
- Rewrite the statement to avoid the unsupported feature.
- Check the version notes — the feature may exist in a newer release.
- Move the operation outside the disallowed context if applicable.
Version applicability
This message text is present in PostgreSQL 18, 19. It was introduced around PostgreSQL 18; earlier releases do not emit this exact text.
Related & next steps
Reference: PostgreSQL Appendix A PostgreSQL Error Codes.