Re: Inconsistent RestrictInfo serial numbers

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistent RestrictInfo serial numbers
Date: 2024-10-09 06:06:11
Message-ID: CAMbWs4-ei3doNtPEQdZH0OzvUMiFNEc8Uh-KM-3SYzbhuAFqZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 9, 2024 at 11:15 AM Andrei Lepikhov <lepihov(at)gmail(dot)com> wrote:
> On 10/8/24 18:20, Richard Guo wrote:
> > To fix, I think we can reset the root->last_rinfo_serial counter after
> > generating the additional constant-FALSE RestrictInfo. Please see
> > attached.

> The approach will work, no doubt. But why are you using such a wordy
> approach with save_last_rinfo_serial? I'd say it is better to invent a
> function like make_rinfo_variant() or something like that and explicitly
> set rinfo_serial. It will be easier to read and understand in the
> future, won't it?

Maybe, but I don't think it's worth creating a new function for such a
straightforward operation, nor do I think it's worth changing the
internals of make_restrictinfo() regarding how root->last_rinfo_serial
is incremented, as that would require updating all the callers of this
function.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2024-10-09 06:15:08 Re: Set AUTOCOMMIT to on in script output by pg_dump
Previous Message Peter Smith 2024-10-09 05:43:11 Re: Pgoutput not capturing the generated columns