Re: Trigger Function question

Поиск
Список
Период
Сортировка
От Lorusso Domenico
Тема Re: Trigger Function question
Дата
Msg-id CAJMpnG60Zc-AcV=CXuqUhVc3ms224c32W+Qf6B=zDpocNmrtsA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger Function question  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
I've just finish to do the same thing.
For my needs, I decided to create a table with the information I need for each view (yes I set trigger on view not on table).

anyway, hstore is more performant rather than jsonb but both of them could treat NEW and OLD as hashmap (or associative array)


Il giorno lun 10 lug 2023 alle ore 20:53 Christophe Pettus <xof@thebuild.com> ha scritto:


> On Jul 10, 2023, at 11:46, DAVID ROTH <adaptron@comcast.net> wrote:
>
> Is there a way to get new.* into a jsonb column?

The to_jsonb() function accepts a row type like NEW.*, and returns a JSONB object with the keys as column names.



--
Domenico L.

per stupire mezz'ora basta un libro di storia,
io cercai di imparare la Treccani a memoria... [F.d.A.]

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to add function schema in search_path in option definitio
Следующее
От: Lorusso Domenico
Дата:
Сообщение: Re: How to add function schema in search_path in option definitio