pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: After Trigger assignment to NEW
Date: Fri, 24 Feb 2006 21:47:51 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <3649.1140797162@sss.pgh.pa.us>

O Tom Lane Ýãñáøå óôéò Feb 24, 2006 :

> Achilleus Mantzios <achill@matrix.gatewaynet.com> writes:
> > Is there a reason that the NEW values should remain unchanged in AFTER 
> > row triggers?
> 
> By definition, an AFTER trigger is too late to change what was stored.
> Use a BEFORE trigger.

Too late if someone wants to store it.
I wanna store the intented original values, thats why i use AFTER trigger.
But i would like to alter what a final AFTER trigger would see.

I'll elabarote a little.

An update happens.
The row is stored.
An after trigger is fired that alters some NEW columns
(nullifies them), aiming for a subsequent trigger
to see the altered results .

It should be something like a pointer to a HeapTuple, (right?),
so that would be feasible i suppose.

I would not even make a post if it was something that trivial.

I hope you get my point.

> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
> 

-- 
-Achilleus




view thread (9+ messages)  latest in thread

Message-ID: <Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, tgl@sss.pgh.pa.us
  Subject: Re: After Trigger assignment to NEW
  In-Reply-To: <Pine.LNX.4.44.0602242138560.20246-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox