Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL |
| Дата | |
| Msg-id | 1896001.1677767049@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL (Daniel Gustafsson <daniel@yesql.se>) |
| Список | pgsql-hackers |
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 1 Mar 2023, at 00:20, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Also ... at least in assert-enabled builds, maybe we could check that
>> the column being fetched this way is actually marked attnotnull?
> We could, but that would limit the API to attnotnull columns, rather than when
> the caller knows that the attr cannot be NULL either due to attnotnull or due
> to intrinsic knowledge based on what is being extracted.
> An example of the latter is build_function_result_tupdesc_t() which knows that
> proallargtypes cannot be NULL when calling SysCacheGetAttr.
OK, if there are counterexamples then never mind that. I don't think
we want to discourage call sites from using this function.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера