Re: Multiple TRIGGERs and OLD versus NEW "records"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jorge Godoy <jgodoy(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple TRIGGERs and OLD versus NEW "records"
Date: 2007-03-14 15:44:22
Message-ID: 23002.1173887062@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jorge Godoy <jgodoy(at)gmail(dot)com> writes:
> If I change some column -- e.g. fill in some automatic calculated column or a
> timestamp column --, when I run the second trigger will OLD be the data stored
> at the database already or will it be affected by the NEW data returned from
> the previous trigger?

OLD is the data actually in the database. NEW is the currently proposed row.
So prior triggers can change what you see as NEW, but not OLD.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurent 2007-03-14 15:52:43 Re: Windows psql.exe password from pgpass.conf
Previous Message Alban Hertroys 2007-03-14 15:42:48 Re: Trigger Question