postgresql/src/backend/utils/cache
Daniel Gustafsson d435f15fff Add SysCacheGetAttrNotNull for guaranteed not-null attrs
When extracting an attr from a cached tuple in the syscache with
SysCacheGetAttr the isnull parameter must be checked in case the
attr cannot be NULL.  For cases when this is known beforehand, a
wrapper is introduced which perform the errorhandling internally
on behalf of the caller, invoking an elog in case of a NULL attr.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Reviewed-by: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/AD76405E-DB45-46B6-941F-17B1EB3A9076@yesql.se
2023-03-25 22:49:33 +01:00
..
attoptcache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
catcache.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
evtcache.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
inval.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
lsyscache.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
Makefile Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
partcache.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
plancache.c Get rid of the "new" and "old" entries in a view's rangetable. 2023-01-18 13:23:57 -05:00
relcache.c Ignore BRIN indexes when checking for HOT updates 2023-03-20 11:02:42 +01:00
relfilenumbermap.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
relmapper.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
spccache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
syscache.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
ts_cache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
typcache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00