Search Postgresql Archives

Re: Trigger Function question

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

 



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@xxxxxxxxxxxx> ha scritto:


> On Jul 10, 2023, at 11:46, DAVID ROTH <adaptron@xxxxxxxxxxx> 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.]

[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