Re: Virtual generated columns

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Re: Virtual generated columns
Date: 2025-02-07 12:36:28
Message-ID: de2ccd1d-c79b-4f37-a5f6-7e7f54977792@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.02.25 14:03, vignesh C wrote:
> One suggestion: for the option where the user specifies
> publish_generated_columns as virtual (as shown below), could we change
> the error indicating that virtual generated columns are not currently
> supported?
> CREATE PUBLICATION pub1 FOR TABLE t1 WITH (publish_generated_columns = virtual);
>
> Also, could we add a XXX comment in either decode.c, pgoutput.c, or
> publicationcmds.c outlining what would be needed to support the
> replication of virtual generated columns? Specifically, it would be
> helpful if we could include how to retrieve virtual generated column
> data during decoding. This would serve as a reference for anyone
> working on enabling logical replication of virtual generated columns
> in the future.

I think adding support for virtual generated columns in logical
replication would require a lot more work than filling in the handful of
places that we know about. (Otherwise, we'd already have done it now.)
So I'd rather not give potentially misleading or incomplete advice.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sutou Kouhei 2025-02-07 13:01:17 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Peter Eisentraut 2025-02-07 12:34:47 Re: Virtual generated columns