Thread: [trigger] is it possible to launch a shell script?
Hello all, I have to synchronize the content of 2 databases, each one being used by an application from our Information System ; unfortunately these apps require a specific DBMS : one needs MySQL and the other Postgresql. Now I want the mysql database to be updated with the data from Postgresql when this one is updated itself. I heard about triggers, but I did not find any way to activate something else than an SQL procedure with Postgresql ; with Oracle I know that I can launch nearly whatever I want (including standalone sowtware) and I can easily write a shell script which would call the mysql & insert the data, BUT is it possible at all? Thank you in advance for your answers, remarks and suggestions. Faithfully yours, Grégory Luguet
--- Gr�gory_Luguet <gregory.luguet@evidian.com> wrote: > I heard about triggers, but I did not find any way > to activate something > else than an SQL procedure with Postgresql ; with > Oracle I know that I can > launch nearly whatever I want (including standalone > sowtware) and I can > easily write a shell script which would call the > mysql & insert the data, > BUT is it possible at all? I've read that you can write your trigger procedures in C. Maybe you can use C system call to call a shell script. I haven't tried programming stored procedures in C. The following is the section of the manual regarding triggers http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/triggers.html Hope that helps, ludwig. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com