Re: Allowed to return possibly TOASTed datums?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Allowed to return possibly TOASTed datums?
Date: 2024-12-14 21:37:30
Message-ID: 1472143.1734212250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Johnson <ronljohnsonjr(at)gmail(dot)com> writes:
> Since the purpose of TOAST is just (I think) to store "large field values"
> on disk by dividing into multiple chunks, what would be the purpose of
> returning the TOASTed value to Jan's function?

Probably not much. There are scenarios where not detoasting
saves work overall, because the object never has to get detoasted;
but I think that's rare. It'd probably look like

UPDATE t SET c = no_op_function(c) WHERE ...

which is something few people would write.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-12-15 16:58:49 Request for new column in pg_namespace
Previous Message Ron Johnson 2024-12-14 18:13:55 Re: Allowed to return possibly TOASTed datums?