Re: Datum values consistency within one query

2020-04-03 Thread Tom Lane
Paul Ramsey writes: > So, if I tested for VARATT_IS_EXTENDED(), and then for > VARATT_IS_EXTERNAL_ONDISK(attr) and then did > VARATT_EXTERNAL_GET_POINTER(toast_pointer, attr), I could use va_valueid + > va_toastrelid as keys in the cache for things that passed that filter? I'm pretty sure VARA

Re: Datum values consistency within one query

2020-04-03 Thread Paul Ramsey
> On Apr 2, 2020, at 4:30 PM, Tom Lane wrote: > > Paul Ramsey writes: >> Getting the datum value is really fast, so I can have a cache that >> keeps the latest detoasted object around, and update it when the datum >> changes, and store the cache information in the parent context. Like >> so:

Re: Datum values consistency within one query

2020-04-02 Thread Tom Lane
Paul Ramsey writes: > Getting the datum value is really fast, so I can have a cache that > keeps the latest detoasted object around, and update it when the datum > changes, and store the cache information in the parent context. Like > so: Jeez, no, not like that. You're just testing a pointer.