I am using PostgreSQL 12, is it possible to use a query on a generated column?
I mean, using in the column creation
GENERATED ALWAYS AS (some query) STORED
I am using PostgreSQL 12, is it possible to use a query on a generated column?
I mean, using in the column creation
GENERATED ALWAYS AS (some query) STORED
The "some query" has to be immutable, at least in version 13:
The generation expression can refer to other columns in the table, but not other generated columns. Any functions and operators used must be immutable. References to other tables are not allowed.
© 2022 - 2025 — McMap. All rights reserved.