Re: Trigger
От | Tom Lane |
---|---|
Тема | Re: Trigger |
Дата | |
Msg-id | 11167.963589742@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Trigger (Carolyn Lu Wong <carolyn@kss.net.au>) |
Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: