Re: Pgoutput not capturing the generated columns

Peter Smith <smithpb2250@gmail.com>

From: Peter Smith <smithpb2250@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>, "Shinoda, Noriyoshi (SXD Japan FSI)" <noriyoshi.shinoda@hpe.com>, Daniel Gustafsson <daniel@yesql.se>, Michael Paquier <michael@paquier.xyz>, Shubham Khanna <khannashubham1197@gmail.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Rajendra Kumar Dangwal <dangwalrajendra888@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "euler@eulerto.com" <euler@eulerto.com>
Date: 2025-01-28T00:26:09Z
Lists: pgsql-hackers
On Fri, Jan 24, 2025 at 6:38 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Fri, 24 Jan 2025 at 10:36, vignesh C <vignesh21@gmail.com> wrote:
> >
> > On Fri, 24 Jan 2025 at 09:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > >
> > > Amit Kapila <amit.kapila16@gmail.com> writes:
> > > > On Fri, Jan 24, 2025 at 8:39 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > >> I think the problem is not so much the underscore as the
> > > >> inconsistency.  You've got "pub", "gen", and "cols" run together,
> > > >> but then you feel a need to separate "type"?
> > >
> > > > It was easy to read and to avoid getting a single word too long.
> > > > However, I do understand your concern. so will change it to
> > > > pubgencolstype unless you or someone prefers pubgencols?
> > >
> > > I think I'd vote for "pubgencols".  I don't see what the "_type"
> > > suffix is supposed to convey --- there is nothing very type-y about
> > > this.
> >
> > I believe simply renaming the catalog column to 'pubgencols' should
> > suffice. We can keep the internal structure name as 'pubgencols_type'
> > as it is not exposed, unless you prefer to update it to 'pubgencols'
> > as well.
>
> The attached patch has the changes for the same.
>

Hi Vignesh

The changes LGTM.

I was surprised that there was no need to modify any expected test
output. I guess that means there are no tests anywhere directly
looking at the pg_publication catalog column names, but instead, all
tests for that catalog must be going via a publication view or using
psql describe output.

======
Kind Regards,
Peter Smith.
Fujitsu Australia



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Doc: Generated column replication.

  2. Rename pubgencols_type to pubgencols in pg_publication.

  3. Doc: Fix column name in pg_publication catalog.

  4. Fix buildfarm failure introduced by commit e65dbc9927.

  5. Change publication's publish_generated_columns option type to enum.

  6. Fix \dRp+ output when describing publications with a lower server version.

  7. Replicate generated columns when 'publish_generated_columns' is set.

  8. Doc: Update the behavior of generated columns in Logical Replication.

  9. Replicate generated columns when specified in the column list.

  10. Doc: Generated columns are skipped for logical replication.