Re: Improve the error message for logical replication of regular column to generated column.

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Shubham Khanna <khannashubham1197(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve the error message for logical replication of regular column to generated column.
Date: 2024-11-26 10:52:23
Message-ID: CAA4eK1J0h2HggRBwy2m8nXTcC7spxrOGtZX+3YJ=Cw6MZyPtYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 26, 2024 at 1:37 PM Shubham Khanna
<khannashubham1197(at)gmail(dot)com> wrote:
>
> I have fixed the given comments. The attached Patch contains the
> required changes.
>

The patch looks mostly good to me. I have made slight adjustments in
the comments and error message. The following proposed error message
appears to have a missing connector between relation and columns:
"cannot replicate to target relation \"%s.%s\" generated column: %s";
so, I propose to change it to: "logical replication target relation
\"%s.%s\" has incompatible generated column: %s". The proposed message
is similar to the existing message for missing columns.

Additionally, I kept only one test case as there is no need to keep
tests for every possible combination.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v7-0001-Improve-error-message-for-replication-of-generate.patch application/octet-stream 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Evgeniy Gorbanyov 2024-11-26 10:56:50 Possible integer overflow in bringetbitmap()
Previous Message Rahila Syed 2024-11-26 10:40:13 Re: Separate memory contexts for relcache and catcache