]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add tuple deformation test for virtual generated columns
authorDavid Rowley <drowley@postgresql.org>
Wed, 17 Jun 2026 04:57:16 +0000 (16:57 +1200)
committerDavid Rowley <drowley@postgresql.org>
Wed, 17 Jun 2026 04:57:16 +0000 (16:57 +1200)
commit1f7dfe8c8ef725ded72f7398ceca4b39ea511aee
treec7d767b070a5a4891e40274d58e19ecff6cc71da
parentab3023ad1e685987ee1b5e7f28e0635296464cf5
Add tuple deformation test for virtual generated columns

Add coverage for a virtual generated NOT NULL column followed by a
physically stored NOT NULL column.  This exercises the tuple deformation
case fixed by 89eafad297a, where TupleDescFinalize() could incorrectly
treat a virtual generated column as part of the guaranteed physical column
prefix and compute cached offsets past it.

Without that fix, deforming the following column could read from the wrong
tuple offset.

Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/A4BC563C-0CA3-4EF3-952A-EA41F9E5BF1E%40gmail.com
src/test/regress/expected/generated_stored.out
src/test/regress/expected/generated_virtual.out
src/test/regress/sql/generated_stored.sql
src/test/regress/sql/generated_virtual.sql