Re: change tuple before insert

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vivek(at)staff(dot)ownmail(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: change tuple before insert
Date: 2006-08-02 12:55:07
Message-ID: 14793.1154523307@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

<vivek(at)staff(dot)ownmail(dot)com> writes:
> How do i change the contents of a tuple for a row level trigger? do i have to return tg_trigtuple or tg_newtuple? The doc is confusing. it says a tg_newtuple can only be used in case of an update>

You should not scribble on either of those. Make a fresh tuple and
return that.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message vivek 2006-08-02 13:43:35 Re: change tuple before insert
Previous Message Andro 2006-08-02 11:18:06 [libpq] columns binding?