Subject: C functions

From: "Raymond Frost (305) 284-3969" <[email-masked]>
Date: Mon, 13 Apr 92 13:49:31 -0700

The dynamic loader seems to object to the system call on the following
c function.  Is there a way around this?  Also is there a way to pass
control to a c program in the action part of a rule?

int warning(patient)
int patient;
{
        system("mail < warning postgres\n");
        return (patient);
}
/u/rfrost/postgres/demo> monitor test
Welcome to the C POSTGRES terminal monitor

Query sent to backend is "define function warning (   language = "c",                              returntype = int4)       arg is (int4)      as "/u/rfrost/postgres/demo/m.o" "
DEFINE
Query sent to backend is "load "/u/rfrost/postgres/demo/m.o" "
WARN:Apr 13 01:09:44:dynamic_loader: Illegal ext. symbol system

Raymond Frost
University of Miami

---

From: postarch (Postgres Mailing Archive)
Date: Wed, 15 Apr 92 16:20:28 PDT

you write:
> Query sent to backend is "define function warning (   language = "c",        
 +                      returntype = int4)       arg is (int4)      as "/u/rfro
 +st/postgres/demo/m.o" "
> WARN:Apr 13 01:09:44:dynamic_loader: Illegal ext. symbol system

Rumor has it that this is an error in the OLD DECstation dynamic loader.
The best fix would be to upgrade to Ultrix 4.x.  If not, you have to add
the declaration for "system" to the list of ExtSyms in dec/dynamic_syms.c:

	SymbolDecl(system),

Once done then rebuild postgres:

	Make postgres install

Jeff Meredith
[email-masked]