Re: set_rel_pathlist function unnecessary params.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: set_rel_pathlist function unnecessary params.
Date: 2024-09-30 19:56:22
Message-ID: 1500220.1727726182@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kirill Reshke <reshkekirill(at)gmail(dot)com> writes:
> I happened to notice that `set_rel_pathlist` params, RelOptInfo *rel
> and RangeTblEntry *rte are
> unnecessary, because upon all usages,
> `rte=root->simple_rte_array[rti]` and
> `rel=root->simple_rel_array[rti]` holds. What's the point of providing
> the same information 3 times?

To avoid having to re-fetch it from those arrays?

> So, I propose to refactor this a little bit.
> Am I missing something?

I'm -1 on changing this. It'd provide no detectable benefit
while creating back-patching hazards in this code.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-09-30 20:05:01 Re: pg_verifybackup: TAR format backup verification
Previous Message Kirill Reshke 2024-09-30 19:38:56 set_rel_pathlist function unnecessary params.