Indeed. But I do think your approach - which means that the binary data is > actually interpreded as a datum of a specific type, drastically > increases the risk. > > Agreed.
As I noted earlier, I don't at all think deTOASTing is a must for this function to be valuable, just as tuple_data_split() is also valuable without deTOASTINGing. I believe "best effort" is very reasonable in the case of a what is an investigatory method to begin with.