Triggers and SPI, oh my!

From: Joel Dudley <Joel(dot)Dudley(at)DevelopOnline(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Triggers and SPI, oh my!
Date: 2001-06-13 16:42:31
Message-ID: A04BDD2C264AD41181C000508BDCB72AB83793@usazdolexch0.developonline.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,
We are writing a trigger in C that is somewhat like a replication trigger.
It needs to know if data is inserted, updated, or deleted from a particular
table. When the data changes, it must be able to get these changes and write
them to a file. We have been using SPI to get the tuple information when the
data changes, but we are having a problem with inserts. I can't seem to
figure out how to get inserted data from a C trigger. Here is the scenario.
When data is inserted into a table, the trigger must be able to get the
inserted data and write it to a file. How can a C trigger get a hold of data
from an insert? Thanks in advance for your comments.

Joel Dudley
Unix Admin
DevelopOnline.com

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-06-13 16:43:57 Re: 7.1.2 temporary file area
Previous Message Tom Lane 2001-06-13 16:40:19 Re: 7.1.2 temporary file area