pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: S.F. Lee <sflee_tw@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: how to execute a C program via trigger ?
Date: Mon, 4 Dec 2000 00:47:29 -0800 (PST)
Message-ID: <20001204084729.45208.qmail@web10402.mail.yahoo.com> (raw)

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/



view thread (5+ messages)  latest in thread

Message-ID: <20001204084729.45208.qmail@web10402.mail.yahoo.com>
Permalink:  ../20001204084729.45208.qmail@web10402.mail.yahoo.com/
Also on:    postgresql.org/message-id/20001204084729.45208.qmail@web10402.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sflee_tw@yahoo.com
  Subject: Re: how to execute a C program via trigger ?
  In-Reply-To: <20001204084729.45208.qmail@web10402.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox