]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Forbid generated columns in FOR PORTION OF
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 6 Jul 2026 07:19:02 +0000 (09:19 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 6 Jul 2026 07:34:11 +0000 (09:34 +0200)
commitc8d49ffb007b2f5aff61cff2ff68786f2d53ac5d
tree0cbc76db9eec8ad8c959b04eff303082b12f3c4c
parent98d5d7ee6419dc4b3894d7b4610a2e128f675052
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
doc/src/sgml/ddl.sgml
src/backend/optimizer/plan/planner.c
src/test/regress/expected/for_portion_of.out
src/test/regress/sql/for_portion_of.sql