Re: Exporting modifications to a table as XML/JSON - Mailing list pgsql-sql

From David G. Johnston
Subject Re: Exporting modifications to a table as XML/JSON
Date
Msg-id CAKFQuwYu1rjB2TTLnCRY7c2vo+B_Hj2V1QOfqmygZtCyak4CCg@mail.gmail.com
Whole thread Raw
In response to Re: Exporting modifications to a table as XML/JSON  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-sql
On Mon, May 11, 2020 at 4:37 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
I am sure that examples exist in the wild of attaching an audit trigger to a table so that the json form of the OLD and NEW (the PostgreSQL version of "Inserted" and "Deleted" (more or less?) records can be either directly inserted into another table or passed to a function that handles that task (simple functional encapsulation).

In particular you should review the documentation:


Both the "record" oriented one and the newer "transition tables" one - which is probably more similar to what your example code does (haven't used that feature myself).

David J.

pgsql-sql by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Exporting modifications to a table as XML/JSON
Next
From: Igor Shmukler
Date:
Subject: Postgres stored procedure errs while parsing JSONB object