agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add tuple deformation test for virtual generated columns
Date: Wed, 17 Jun 2026 04:58:02 +0000
Message-ID: <E1wZiLi-000frX-0a@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1f7dfe8c8ef725ded72f7398ceca4b39ea511aee

Modified Files
--------------
src/test/regress/expected/generated_stored.out  |  5 +++++
src/test/regress/expected/generated_virtual.out | 10 ++++++++++
src/test/regress/sql/generated_stored.sql       |  5 +++++
src/test/regress/sql/generated_virtual.sql      |  6 ++++++
4 files changed, 26 insertions(+)



Message-ID: <E1wZiLi-000frX-0a@gemulon.postgresql.org>
Permalink:  ../E1wZiLi-000frX-0a@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wZiLi-000frX-0a@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add tuple deformation test for virtual generated columns
  In-Reply-To: <E1wZiLi-000frX-0a@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox