Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e6EFnF022745 for ; Fri, 14 Jul 2000 11:49:16 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA11170; Fri, 14 Jul 2000 11:49:02 -0400 (EDT) To: Carolyn Lu Wong cc: "pgsql-sql@postgresql.org" Subject: Re: Trigger In-reply-to: <396F1FAA.29F680B2@kss.net.au> References: <396F1FAA.29F680B2@kss.net.au> Comments: In-reply-to Carolyn Lu Wong message dated "Sat, 15 Jul 2000 00:11:54 +1000" Date: Fri, 14 Jul 2000 11:49:02 -0400 Message-ID: <11167.963589742@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200007/151 Carolyn Lu Wong 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