mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Forbid generated columns in FOR PORTION OF
With virtual generated columns there is no column to assign to, and we shouldn't assign directly to stored generated columns either. (Once we have PERIODs, we will allow a stored generated column here, but we will assign to its start/end inputs.) We can't do this in parse analysis, because views haven't yet been rewritten, so they mask generated columns. Author: Paul A. Jungwirth <pj@illuminatedcomputing.com> Discussion: https://www.postgresql.org/message-id/agOOykf2HV26yVfU%40nathan
This commit is contained in:
@@ -382,7 +382,9 @@ CREATE TABLE people (
|
||||
A generated column cannot be written to directly. In
|
||||
<command>INSERT</command> or <command>UPDATE</command> commands, a value
|
||||
cannot be specified for a generated column, but the keyword
|
||||
<literal>DEFAULT</literal> may be specified.
|
||||
<literal>DEFAULT</literal> may be specified. Also, a generated column
|
||||
cannot be used in the <literal>FOR PORTION OF</literal> clause of an
|
||||
<command>UPDATE</command> or <command>DELETE</command> command.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
Reference in New Issue
Block a user