Received: from thor.tht.net (thor.tht.net [209.47.145.4]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB4FUF059332 for ; Mon, 4 Dec 2000 10:30:15 -0500 (EST) (envelope-from sflee_tw@yahoo.com) Received: from web10402.mail.yahoo.com (web10402.mail.yahoo.com [216.136.130.94]) by thor.tht.net (8.9.3/8.9.3) with SMTP id EAA38409 for ; Mon, 4 Dec 2000 04:48:20 GMT (envelope-from sflee_tw@yahoo.com) Message-ID: <20001204084729.45208.qmail@web10402.mail.yahoo.com> Received: from [203.66.42.5] by web10402.mail.yahoo.com; Mon, 04 Dec 2000 00:47:29 PST Date: Mon, 4 Dec 2000 00:47:29 -0800 (PST) From: "S.F. Lee" Subject: how to execute a C program via trigger ? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200012/23 X-Sequence-Number: 354 Hi, I am using Red Hat 6.1 + PostgreSQL 7.0.3. All of my applications are developed by C and ECPG. I would like to know how to execute a C program by Trigger,for example: 1. I have a program my_c_program.c shuch as: #include main() { printf("Hello World !\n"); } 2. I create a table foo by following command CREATE TABLE foo ( x int4 ); 3. create a trigger foo_trig : create trigger foo_trig after update on foo for each row execute procedure sql_c(); 4. I don't know how to design sql_c(), can anyone give a small plpsql program that can execute my_c_program? regards, S.F. Lee __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/