-
- Downloads
Remove partial, broken support for NULL pointers when fetching attributes.
Previously, fastgetattr() and heap_getattr() tested their fourth argument against a null pointer, but any attempt to use them with a literal-NULL fourth argument evaluated to *(void *)0, resulting in a compiler error. Remove these NULL tests to avoid leading future readers of this code to believe that this has a chance of working. Also clean up related legacy code in nocachegetattr(), heap_getsysattr(), and nocache_index_getattr(). The new coding standard is that any code which calls a getattr-type function or macro which takes an isnull argument MUST pass a valid boolean pointer. Per discussion with Bruce Momjian, Tom Lane, Alvaro Herrera.
Showing
- src/backend/access/common/heaptuple.c 17 additions, 57 deletionssrc/backend/access/common/heaptuple.c
- src/backend/access/common/indextuple.c 3 additions, 36 deletionssrc/backend/access/common/indextuple.c
- src/backend/access/heap/heapam.c 5 additions, 5 deletionssrc/backend/access/heap/heapam.c
- src/include/access/htup.h 7 additions, 7 deletionssrc/include/access/htup.h
- src/include/access/itup.h 4 additions, 4 deletionssrc/include/access/itup.h
Loading
Please register or sign in to comment