Re: trigger function in plpgsql (newbie)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gunnar(at)gunix(dot)mine(dot)nu
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: trigger function in plpgsql (newbie)
Date: 2001-10-28 17:37:38
Message-ID: 5768.1004290658@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gunnar Lindholm <gunnar(at)gunix(dot)mine(dot)nu> writes:
> Hello. I'm a total newbie when it comes to plpgsql and trigger functions, but
> here is my code that does not work

You need a BEFORE INSERT trigger, not AFTER INSERT. After the insertion
is too late to change the row that will be stored.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-10-28 17:57:57 Re: Problem with some function
Previous Message Todd Williamsen 2001-10-28 17:36:36 Re: Ultimate DB Server