From: GH <grasshacker@over-yonder.net>
To: rui zhong <rick_rui@hotmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: question on trigger
Date: Sat, 23 Jun 2001 19:03:07 -0500
Message-ID: <20010623190307.A58240@over-yonder.net> (raw)
In-Reply-To: <F207zdgJI7fG7rIgwbO0001bf2b@hotmail.com>
References: <F207zdgJI7fG7rIgwbO0001bf2b@hotmail.com>
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
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-general@postgresql.org
Cc: grasshacker@over-yonder.net, rick_rui@hotmail.com
Subject: Re: question on trigger
In-Reply-To: <20010623190307.A58240@over-yonder.net>
* 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