AS <generation_expression>
clause in CREATE TABLE or CREATE SOURCE statements, for example:
- A generation expression cannot reference another generated column.
- The generated column is created in RisingWave and will not be accessed through the external connector. Therefore, if the external upstream system has a schema, it does not need to include the generated column within the table’s schema in the external system.
- The generated column with impure expressions can not be part of the primary key.
- A generated column in a table is stored in the created table, and computed when it is inserted. This is equivalent to the
STORED
type of generated columns in PostgreSQL. - A generated column in a source is not stored in the created source, and is computed when the source is queried. This is equivalent to the
VIRTUAL
type of generated columns in PostgreSQL.
proctime()
function, for example: