Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eB4KEHG29104 for ; Mon, 4 Dec 2000 15:14:17 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from freek.imc ([216.18.11.44]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eB4HuNG05396 for ; Mon, 4 Dec 2000 12:56:23 -0500 (EST) (envelope-from clayton@marketingchallenge.com) Received: (qmail 28963 invoked from network); 4 Dec 2000 17:56:44 -0000 Received: from cerberus.imc (HELO marketingchallenge.com) (216.18.11.61) by freek.imc with SMTP; 4 Dec 2000 17:56:44 -0000 Message-ID: <3A2BDB02.2746C0D2@marketingchallenge.com> Date: Mon, 04 Dec 2000 09:57:22 -0800 From: clayton cottingham X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: "S.F. Lee" CC: pgsql-sql@postgresql.org Subject: Re: how to execute a C program via trigger ? References: <20001204084729.45208.qmail@web10402.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/26 X-Sequence-Number: 357 take a look at the contrib sections fti or fulltext index example it takes you through it all "S.F. Lee" wrote: > > 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/