Received: from hotmail.com (law2-f195.hotmail.com [216.32.181.195]) by hub.org (8.9.3/8.9.3) with SMTP id MAA97654 for ; Sun, 16 May 1999 12:23:57 -0400 (EDT) (envelope-from fabbaena@hotmail.com) Received: (qmail 84207 invoked by uid 0); 16 May 1999 16:23:26 -0000 Message-ID: <19990516162326.84206.qmail@hotmail.com> Received: from 200.31.14.175 by www.hotmail.com with HTTP; Sun, 16 May 1999 09:23:25 PDT X-Originating-IP: [200.31.14.175] From: "fabian baena" To: pgsql-general@postgreSQL.org Subject: Trying to make functions in 'C' Date: Sun, 16 May 1999 11:23:25 COT Mime-Version: 1.0 Content-type: text/plain; format=flowed; I'm tying to learn how to make function in 'C'. I'm trying to compile a program I made in 'C'. The command I gave were: % gcc -fPIC -c addone.c -I/usr/local/pgsql/include % ld -G -Bdynamic -o addone.so addone.o and created the function in postgres like this: CREATE FUNCTION add_one(int4) RETURNS int4 AS './addone.so' LANGUAGE 'c'; The function I made looks like this: #include "postgres.h" int add_one(int arg) { return arg + 1; } But when I try to test the function in postgres I recieve this error: ERROR: stat failed on file ./addone.so ERROR: stat failed on file ./addone.so Can anyone tell where did I make a mistake? I have a linux on a PC. Thank you. Fabian. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com