Hi!
Andy, I'm truly sorry, I removed quoted messages just to not
make replies to walls of text.
On detoast_attr_buffer topic - and again agree with reply above
that supposes adding required data length as parameter, at least
by doing so we should explicitly make the user of this API pay
attention to the length of the buffer and data size, as it is done
in text_to_cstring_buffer you mentioned.
About printtup: I agree direct detoasting to the buffer could give
us some performance improvement, it seems not too difficult
to check, but as you can see there is a function call via fmgr,
it is better to try to find out why such a decision was made.