Search Postgresql Archives

Re: before insert for each row trigger on upsert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ted Toth <txtoth@xxxxxxxxx> writes:
> I think you are right in that the trigger doesn't change the row being
> updated (which is good) but it also updates another table and that's what
> I'd actually like to avoid on update.

Probably need to put that in an AFTER trigger, then.  By definition,
BEFORE triggers don't really know whether the insert is going to
happen.  This doesn't even require use of upsert to cause a problem:
a later BEFORE trigger could prevent the insertion, or change what
gets inserted.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux