Re: how to execute a C program via trigger ?

From: clayton cottingham <clayton(at)marketingchallenge(dot)com>
To: "S(dot)F(dot) Lee" <sflee_tw(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: how to execute a C program via trigger ?
Date: 2000-12-04 17:57:22
Message-ID: 3A2BDB02.2746C0D2@marketingchallenge.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 <stdio.h>
> 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/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2000-12-04 19:04:51 Re: [SQL] Rules with Conditions: Bug, or Misunderstanding
Previous Message The Hermit Hacker 2000-12-04 17:24:19 Re: v7.1 Beta?