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: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Shubham Khanna <khannashubham1197(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-27 03:20:28
Message-ID: CAA4eK1JeZ9_5TRtTjZu6BKdcmOA9GzPxnxaPRvxp5HfyJGCEFg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 27, 2024 at 3:30 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi, here are some review comments for patch v7-0001.
>
> ======
> src/backend/replication/logical/relation.c
>
> logicalrep_report_missing_or_gen_attrs:
>
> 1.
> +/*
> + * If attempting to replicate missing or generated columns, report an error.
> + * Prioritize 'missing' errors if both occur though the prioritization is
> + * random.
> + */
>
> That part "though the prioritization is random" seems wrongly worded
> because there is nothing random here.
>
> I guess the intention was something like "This prioritization design
> choice was arbitrary.", but TBH it may be better not to give any
> reason at all.
>

I think we should give a reason so that if we come across any scenario
or add another one in the future, it will be easier to make the
decision. I'll change the patch to use 'arbitrary' instead of random.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-11-27 03:42:12 Re: CREATE SCHEMA ... CREATE DOMAIN support
Previous Message Tom Lane 2024-11-27 03:19:46 Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE