Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Daniel Gustafsson <daniel@yesql.se>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-01T20:04:55Z
Lists: pgsql-hackers
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. An advantage of using a new function name is it'd be more obvious what's wrong if you try to back-patch such code into a branch that lacks the feature. (Or, of course, we could back-patch the feature.) regards, tom lane
Commits
-
Add SysCacheGetAttrNotNull for guaranteed not-null attrs
- d435f15fff3c 16.0 landed