Subject: "C" function called on append

From: Lance Gatrell (303) 977-2052 <[email-masked]>
Date: Tue, 8 Sep 92 10:46:09 -0700

I want to define a rule that will call a "C" function whenever a tuple
is APPENDed to a table.

For example, I've define a function with the following:
	define function ProcessSubs2 (language = "c", returntype = int4)
	arg is (image) as "....pathname to function"

This function works when I call it directly, ie:
	retrieve (image.ProcessSubs2)

I then tried to define the following rules, but neither will call the "C"
function:
	define rule ProcessSubs2 is on append to image do replace new(nSubs
	= ProcessSubs2(new))

	define rule ProcessSubs2 is on append to image do retrieve 
	(image.ProcessSubs2) where image.oid = new.oid

	define rule example1 is on append to image do retrieve
	(image.ProcessSubs2) where image.oid = new.oid

The result is either that I hang the monitor process, or I get the warning
"WARN: date & time View Rules must not have parameters"!

We're running Postgres 4.0.

Is it possible to have a "C" function called in a defined rule?

Thanks,

Lance B. Gatrell
[email-masked]