Re: modifying new tuple on insert in c trigger

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Damjan Pipan" <damjan(dot)pipan(at)siol(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: modifying new tuple on insert in c trigger
Date: 2002-11-20 13:45:03
Message-ID: m3lm3ojqxs.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Damjan Pipan" <damjan(dot)pipan(at)siol(dot)net> writes:

> Hello!
>
> I'm trying to write a c trigger function which would change an
> attribute of tuple being inserted. I have read this value
> from some other table and now I have a problem, because
> even if I change the tuple with SPI_modifytuple and return
> modified tuple it does not show in db (it did not change the tuple)
> but tuple is inserted.

Is it a BEFORE or AFTER trigger? If it's modifying the inserted tuple
it needs to be BEFORE.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Çagil Seker 2002-11-20 14:40:22 Re: Bug with sequence
Previous Message Yves Bastide 2002-11-20 12:42:23 Re: Handling images using Python