[HACKERS] SearchSysCache, SysCacheGetAttr, and heap_getattr() - Mailing list pgsql-hackers

From Stephen Frost
Subject [HACKERS] SearchSysCache, SysCacheGetAttr, and heap_getattr()
Date
Msg-id 20170120031440.GD18360@tamriel.snowman.net
Whole thread Raw
List pgsql-hackers
Greetings,

There's some inconsistency when it comes to if we actually use
SysCacheGetAttr() when pulling an attribute for a tuple we got via
SearchSysCache(), or if we use heap_getattr().

Maybe I'm missing something, but that seems less than ideal.  I've
generally been under the belief that using heap_getattr() is 'ok' when
we've already opened and locked the relation, but there are some other
checks done through SysCacheGetAttr() that you don't get with
heap_getattr()...

In short, should we be fixing these cases to always use
SysCacheGetAttr() when working with a tuple returned by
SearchSysCache()?

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] Declarative partitioning - another take
Next
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] postgres_fdw bug in 9.6