Re: question on trigger

From: GH <grasshacker(at)over-yonder(dot)net>
To: rui zhong <rick_rui(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question on trigger
Date: 2001-06-24 00:03:07
Message-ID: 20010623190307.A58240@over-yonder.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

And you forwarded this to -jdbc because...?

On Sat, Jun 23, 2001 at 11:10:58PM -0000, some SMTP stream spewed forth:
> Hi,all:
> This is my first time to use trigger. I try an example from programmer's
> guide. Firstly I save the procedure named trigf.c, then i try to comlile it
> by using SQL statement " create function trigf() returns opaque as
> '...path_to_so' language 'c' ", then I got error message as " Load of file
> /home/postgres/trigf.c failed: invalid ELF header ". I don't know how to
> fix this, please help me out. Lots of thanks.

As far as I know, you need to compile the function as a dynamic object:

from:
http://postgresql.crimelabs.net/users-lounge/docs/7.0/user/sql-createfunction.htm
obj_file , link_symbol

This form of the AS clause is used for dynamically-linked, C
language functions when the function name in the C language source code
is not the
same as the name of the SQL function. The string obj_file is the
name of the file containing the dynamically loadable object, and
link_symbol, is
the object's link symbol which is the same as the name of the
function in the C language source code.

Where did you find this example?

gh

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rui zhong 2001-06-24 01:56:35 Re: question on trigger
Previous Message Daniel Åkerud 2001-06-23 23:41:50 Harddisk performance degrading over time?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2001-06-24 03:46:41 RE: Instrumenting and Logging in JDBC
Previous Message btoback 2001-06-23 23:37:37 Instrumenting and Logging in JDBC