| From: | Masahiko Sawada <msawada(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: test_decoding: Don't print virtual generated columns. |
| Date: | 2026-08-18 20:57:40 |
| Message-ID: | E1wwQsN-000000016zx-0qvO@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
test_decoding: Don't print virtual generated columns.
Virtual generated columns are stored in tuples as null values, so
heap_getattr() in tuple_to_stringinfo() always returns null for them.
test_decoding printed such a column as null, which is
indistinguishable from a column that genuinely holds null.
This commit skips virtual generated columns in tuple_to_stringinfo(),
the only place that prints a tuple. Stored generated columns continue
to be printed, since their values do live in the heap tuple.
This is a behavior change rather than a bug fix, and it changes
test_decoding's output for tables that have virtual generated columns,
which could affect consumers that parse it. Therefore it is not
back-patched.
Author: SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>
Co-authored-by: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Reviewed-by: Euler Taveira <euler(at)eulerto(dot)com>
Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHg+QDfTh3UbB-Ed--o2Bd=SBDJoEiG-qp3C0+ETDibF63y=dw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/755f7e2c921f16e6bc09bdc8d286c495b2cee93b
Modified Files
--------------
contrib/test_decoding/expected/ddl.out | 18 ++++++++++++++++++
contrib/test_decoding/sql/ddl.sql | 12 ++++++++++++
contrib/test_decoding/test_decoding.c | 10 ++++++++++
3 files changed, 40 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-08-18 21:34:21 | pgsql: Defend against null "SV *" pointers in plperl modules. |
| Previous Message | Daniel Gustafsson | 2026-08-18 20:41:16 | pgsql: Minor test suite cleanup |