| From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [Patch] Omit virtual generated columns from test_decoding output |
| Date: | 2026-07-31 04:30:00 |
| Message-ID: | CALj2ACWJut-cS4ppWwf1R4+TsCKJ4EzOxw-G8BapzB0_QMOi7g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Thu, May 7, 2026 at 9:31 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> > Fair concern, I moved the tests to ddl.sql. Please find the attached v2 patch.
>
> Seems you forgot to attached the patch.
I agree we must fix this for test_decoding. Here's my take.
When a column holding a genuine NULL value gets decoded, it shows up
as null in the output. But a virtual generated column also shows up as
null, so the two are hard to tell apart in the test_decoding output
today.
table public.t: INSERT: a[integer]:1 b[integer]:null c[integer]:null
d[integer]:100
Here b is a genuine NULL and c is a virtual generated column whose
value is 10 (for example), but both show up as null.
That gives me two reasons to +1 this patch:
1/ It's hard to distinguish in the test_decoding output whether a
column is a genuine NULL or a virtual generated column. For example:
2/ The pgoutput already skips virtual generated columns in
logicalrep_should_publish_column().
I quickly reviewed the v3 patch and it looks good to me. However,
pgindent was not happy, so I ran it, tweaked the comments and commit
message a bit, ran the tests, and attached a v4 patch. Please have a
look.
I prefer to back-patch this through PG18, where virtual generated
columns were introduced (commit 83ea6c54025).
--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Omit-virtual-generated-columns-from-test_decoding-ou.patch | application/x-patch | 6.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-07-31 04:40:55 | Re: [PATCH] Release replication slot on error in SQL-callable slot functions |
| Previous Message | Jeff Davis | 2026-07-31 04:20:06 | Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc. |