Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
Дата
Msg-id 8E5B7C1F-84AF-4159-A54B-CA2B07D639BB@yesql.se
обсуждение исходный текст
Ответ на Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed
Следующее
От: "Gregory Stark (as CFM)"
Дата:
Сообщение: Re: File descriptors in exec'd subprocesses