Re: GetRelationPath() vs critical sections

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, pgsql-hackers(at)postgresql(dot)org, Noah Misch <noah(at)leadboat(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: GetRelationPath() vs critical sections
Date: 2025-02-24 15:50:21
Message-ID: qhptvplcvag5kohfvkcclxgz7lllplrfnvsw4glzmvqxsfos5b@j2etjzjaroyw
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2025-02-20 15:28:39 -0500, Andres Freund wrote:
> On 2025-02-20 14:11:16 -0500, Tom Lane wrote:
> > As a matter of style, I wonder if it'd be better to have these
> > functions write into a caller-supplied variable.
>
> I wondered about that too, it does however make some code more awkward,
> e.g. because there's not a good surrounding block to put the variable in.
>
> I mildly prefer the return-by-value approach, but not more.

Since I've not heard anything on that point, I'm currently thinking with going
with return-by-value. Attached are two very mildly updated patches. Most of
the changes is added commit messages.

Greetings,

Andres Freund

Attachment Content-Type Size
v3-0001-Change-relpath-et-al-to-return-path-by-value.patch text/x-diff 31.9 KB
v3-0002-Change-_mdfd_segpath-to-return-paths-by-value.patch text/x-diff 5.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-02-24 16:04:36 Re: Redact user password on pg_stat_statements
Previous Message Andrew Jackson 2025-02-24 15:38:31 Re: Add Option To Check All Addresses For Matching target_session_attr