Re: Trigger Function question

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: DAVID ROTH <adaptron(at)comcast(dot)net>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Trigger Function question
Date: 2023-07-10 18:51:14
Message-ID: CAB-JLwY-6jo01RNjeWFOy4UC4LQ6OhH4mC8MvWsJaCW53amOGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> Is there a way to get new.* into a jsonb column?
>

select json_object_agg(js.key, js.value) from
json_each_text(row_to_json(new.*)) js

Marcos

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christophe Pettus 2023-07-10 18:52:04 Re: Trigger Function question
Previous Message DAVID ROTH 2023-07-10 18:46:01 Re: Trigger Function question