Search Postgresql Archives

Re: Allowed to return possibly TOASTed datums?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 14, 2024 at 12:02 PM Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Jan Behrens <jbe-mlist@xxxxxxxxxxxxx> writes:
> Is it allowed to use the following function, assuming the data type is
> TOASTable?

> PG_FUNCTION_INFO_V1(mytype_pos);
> Datum mytype_pos(PG_FUNCTION_ARGS) {                             
>   PG_RETURN_DATUM(GETARG_DATUM(0));
> }

Absolutely.  You can find things equivalent to that in the
core code, I think.

(I'm not a developer, so this is a curiosity question, not a challenge.)

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?

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux