Adam Brusselback <adambrusselback@xxxxxxxxx> writes: > Huh, so in the other cases where the function works fine, it's likely that > the data all just fits within the regular table and doesn't have to be > TOAST'ed? If that's the correct theory, yes. Did you match up the OID yet? > So this is something that isn't changed in PG10, and I could have > encountered in 9.6, and just by chance didn't? You could have encountered it anytime since TOAST was invented, or at least since RETURN QUERY was invented (the latter is newer IIRC). The fact that the bug has been there so long and has only been reported a couple of times is the main reason why I'm loath to take a brute force duplicate-the-data approach to fixing it. Such a fix would penalize many more people than it would help. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general