Re: relrewrite not documented at the top of heap_create_with_catalog()

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Steven Niu <niushiji(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: relrewrite not documented at the top of heap_create_with_catalog()
Date: 2025-06-16 13:37:43
Message-ID: 20250616223743.413cc7dcdc967a5d16f08631@sraoss.co.jp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 16 Jun 2025 16:51:46 +0800
Steven Niu <niushiji(at)gmail(dot)com> wrote:

> Hi, Michael,
>
> The change looks good to me.
>
> I made more change based on your patch to combine the old comment.

I think it's a good idea to move the description of heap_create_with_catalog
directly above the function itself, as it seems better to keep the explanation
close to the function definition rather than placing it before related functions.
A similar change was made to heap_drop_with_catalog in commit 49ce6fff1d34.

I'm not sure whether this should be merged into the original patch, though.

I have a very minor comment on the initial patch.

+ * relrewrite: link to original relation during a table rewrite.

I wonder if the period at the end is unnecessary, since this is not a full
sentence, and for consistency with the other lines.

Best regards,
Yugo Nagata

> Regards,
> Steven
>
> Michael Paquier <michael(at)paquier(dot)xyz> 于2025年6月16日周一 14:49写道:
>
> > Hi all,
> >
> > While looking at the heap code, I've found that relrewrite, parameter
> > used a trick to keep a link to the original relation rewritten, is not
> > documented at the top of heap_create_with_catalog() contrary to all
> > its other parameters.
> >
> > A simple patch is attached to document that.
> >
> > Thanks,
> > --
> > Michael
> >

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-06-16 13:41:07 Re: pg_upgrade fails with an error "object doesn't exist"
Previous Message Jim Jones 2025-06-16 13:11:23 Re: Add XMLNamespaces to XMLElement