Received: from smtp1.home.se (smtp1.home.se [195.66.35.200]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5OCfKa64253 for ; Sun, 24 Jun 2001 08:41:20 -0400 (EDT) (envelope-from zilch@home.se) Received: from automatic100 [195.54.154.30] by smtp1.home.se with Novonyx SMTP Server $Revision: 2.74 $; Sun, 24 Jun 2001 14:38:08 +0200 (ECTD) Message-ID: <000801c0fcaa$f4e2ad70$c901a8c0@automatic100> From: =?iso-8859-1?Q?Daniel_=C5kerud?= To: "PostgreSQL-general" References: Subject: Re: question on trigger Date: Sun, 24 Jun 2001 01:21:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2465.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2465.0000 X-Archive-Number: 200106/915 X-Sequence-Number: 11490 Judging by the error message, I would say it looks for a compiled version of your file. Daniel Åkerud > > 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. > > The including H file in trigf.c is : > > > #include "executor/spi.h" /*this is what you need to work with SPI */ > #include "commands/trigger.h" /*-"- and triggers */ > > extern Datum trigf(PG_FUNCTION_ARGS); > > PG_FUNCTION_INFO_V1(trigf); > > Datum > trigf(PG_FUNCTION_ARGS) > { ... } > > > > > Rui > > > > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com > ---------------------------------------------------------------------------- ---- > ---------------------------------------------------------------------------- ---- > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >