Re: How to manipulate field in New record

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to manipulate field in New record
Date: 2023-06-07 12:58:49
Message-ID: ZIB/CTqNFuQ0C3ck@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 07, 2023 at 02:12:58PM +0200, Lorusso Domenico wrote:
> Hello,
> Looking for a global solution I've write e trigger function that as
> optional parameter (argv[0]) receive the name of a specific parameter.
>
> My need is to get the filed from NEW and OLD record manipulate and set back
> the field with new value.
>
> Problem 1: how to get and set this field
> Problem 2: the field has Composit type

Do this in pl/perl, pl/python, pl/tcl or anything like this.

Or use one of methods shown here:
https://www.depesz.com/2021/04/21/getting-value-from-dynamic-column-in-pl-pgsql-triggers/

depesz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2023-06-07 13:57:25 Re: How to manipulate field in New record
Previous Message Lorusso Domenico 2023-06-07 12:12:58 How to manipulate field in New record