Re: Allowed to return possibly TOASTed datums?

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Allowed to return possibly TOASTed datums?
Дата
Msg-id CANzqJaCngKMjcxtzHPggWV3mQU8U2E0zqxDtkznSpQbmPgTCgg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allowed to return possibly TOASTed datums?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Allowed to return possibly TOASTed datums?
Список pgsql-general
On Sat, Dec 14, 2024 at 12:02 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Jan Behrens <jbe-mlist@magnetkern.de> 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!

В списке pgsql-general по дате отправления: