Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
Date
Msg-id 8E5B7C1F-84AF-4159-A54B-CA2B07D639BB@yesql.se
Whole thread Raw
In response to Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 1 Mar 2023, at 21:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
>> Yes please!
>
>> I have occasionally wondered whether just passing the isnull argument as
>> NULL would be sufficient, so we don't need a new function.
>
> I thought about that too.  I think I prefer Daniel's formulation
> with the new function, but I'm not especially set on that.

I prefer the new function since the name makes the code self documented rather
than developers not used to the API having to look up what the last NULL
actually means.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed
Next
From: "Gregory Stark (as CFM)"
Date:
Subject: Re: File descriptors in exec'd subprocesses