Skip site navigation (1) Skip section navigation (2)

Re: Trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)au>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Trigger
Date: 2000-07-14 15:49:02
Message-ID: 11167.963589742@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Carolyn Lu Wong <carolyn(at)kss(dot)net(dot)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

In response to

  • Trigger at 2000-07-14 14:11:54 from Carolyn Lu Wong

pgsql-sql by date

Next:From: Nathan YoungDate: 2000-07-14 16:02:44
Subject: transactions within stored procedures
Previous:From: Tom LaneDate: 2000-07-14 15:09:43
Subject: Re: nevermind...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group