Hi there, I just wanted to let you know that I finally made the trigger work using an external php script. Actually it always worked, the problem is that I was trying the trigger in one machine and testing the results in other. I know, very lame. Some people suggested plphp, I tried it but I had issues trying to compile it. But the project looks promising anyway. Also, I took me a while to figure out how to compile my trigger on FreeBSD and MacOSX/Darwin. Finally I found this in the documentation: http://www.postgresql.org/docs/8.0/interactive/xfunc-c.html which perfectly explains what flags to pass to gcc in order to compile your code on those and other platforms. I didn't find any link or reference to that document in the trigger section. Do you think it would be a good idea to do that? Thanks, David > David Rio Deiros <driodeiros@xxxxxxxxx> writes: > > > Then, I wanted to run the full php script from the trigger. I tried > > the script manually, form the shell, and it worked perfectly. Notice > > that the script doesn't generate any stdin/stdout output. So I changed > > the system(3) parameter to call my php script instead of the test one. > > I tried it and it didn't work. The php script doesn't perform the > > modifications it suppose to in the database. > > > > The php script is about 150 lines long and performs like 5 or 6 sql > > queries/inserts against the database.