Re: Trigger Function question

From: Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: DAVID ROTH <adaptron(at)comcast(dot)net>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Trigger Function question
Date: 2023-07-11 19:41:34
Message-ID: CAJMpnG60Zc-AcV=CXuqUhVc3ms224c32W+Qf6B=zDpocNmrtsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)thebuild(dot)com>
ha scritto:

>
>
> > On Jul 10, 2023, at 11:46, DAVID ROTH <adaptron(at)comcast(dot)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.]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lorusso Domenico 2023-07-11 19:47:04 Re: How to add function schema in search_path in option definitio
Previous Message Adrian Klaver 2023-07-11 19:41:09 Re: How to add function schema in search_path in option definitio