agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Carolyn Lu Wong <carolyn@kss.net.au>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Trigger
Date: Fri, 14 Jul 2000 11:49:02 -0400
Message-ID: <11167.963589742@sss.pgh.pa.us> (raw)
In-Reply-To: <396F1FAA.29F680B2@kss.net.au>
References: <396F1FAA.29F680B2@kss.net.au>

Carolyn Lu Wong <carolyn@kss.net.au> writes:
> In the "Interaction with the Trigger Manager" from the online document,
> it states that it's for V7.1 or later. Because I'm working on earlier
> version, do I need to modify my code if the database is upgraded to
> later versions?

The trigger interface for 7.0 is the same as in 6.5, so you can rely
on the online document for now.

7.1 will have a different trigger interface (but the document hasn't
been updated yet).  The key difference is that the TriggerData structure
will be passed as a parameter rather than being pointed to by a global
variable.  You can minimize the number of changes you will need to make
by not referring to CurrentTriggerData all over the place --- instead,
copy it into a local variable at the start of your trigger function.

> I'm writing the C program in under my home directory. How can I set up
> the environment so that my program compiles?

Easiest way is to point -I at the src/include tree, I'm afraid.  There
are some examples of C triggers in the contrib/ area, take a look at
their makefiles.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <11167.963589742@sss.pgh.pa.us>
Permalink:  ../11167.963589742@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11167.963589742@sss.pgh.pa.us

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: tgl@sss.pgh.pa.us, carolyn@kss.net.au
  Subject: Re: Trigger
  In-Reply-To: <11167.963589742@sss.pgh.pa.us>

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

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