Re: Trigger function does not modify the NEW value

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger function does not modify the NEW value
Date: 2019-06-29 03:07:25
Message-ID: CAKJS1f_k6umFSAyKQd68YRM0-JF=CsAbZ-ALoCQjCp9WKCpcLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 29 Jun 2019 at 14:54, Igal @ Lucee.org <igal(at)lucee(dot)org> wrote:
> create trigger tr_on_table_modified after insert or delete or update
> on some_table for each row execute procedure on_table_modified();

> I can see in the output the notices with the expected values, but the value in the updated record is not lower-cased.

You'll need a BEFORE trigger, not an AFTER trigger.
https://www.postgresql.org/docs/current/sql-createtrigger.html

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igal @ Lucee.org 2019-06-29 03:13:16 Re: Trigger function does not modify the NEW value
Previous Message Igal @ Lucee.org 2019-06-29 02:53:50 Trigger function does not modify the NEW value