Paul Ramsey <pram...@cleverelephant.ca> 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 VARATT_IS_EXTERNAL_ONDISK subsumes the other, so you
don't need to check VARATT_IS_EXTENDED, but yeah.

> What about large const values that haven't been stored in a table yet? (eg, 
> ST_Buffer(ST_MakePoint(0, 0), 100, 10000)) is there a stable key I can use 
> for them?

Nope.  If you could convert them into "expanded datums" then you
might have something ... but without any knowledge about where they
are coming from it's hard to see how to detect that a value is
the same one you dealt with before.

                        regards, tom lane


Reply via email to