Skip site navigation (1) Skip section navigation (2)

Compiling a function

From: Matthew Hagerty <matthew(at)venux(dot)net>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Compiling a function
Date: 1999-04-20 06:41:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

I have a very simple function I am trying to get working with 6.2.4.  I
compiled the C program without any errors, but when I try to do a simple
query to see if it worked I get this error:

select bool2int(1 > 1);

ERROR:  Load of file /usr/local/pgsql/procs/bool2int.o failed: dlopen
(/usr/local/pgsql/procs/bool2int.o) failed

I am running on FreeBSD-3.1-RELEASE with GCC  The command I issued
to compile was:

gcc -fpic -I../include -c bool2int.c

and the program is:

#include "../include/postgres.h"

int2 bool2int(bCondition)
bool    bCondition;
    if (bCondition)

I must say thank you to Jose Soares for providing me a solution, i.e. this
function, however I cannot get it to work.

Matthew Hagerty


pgsql-interfaces by date

Next:From: Matthew HagertyDate: 1999-04-20 08:19:00
Subject: Re: [INTERFACES] Compiling a function
Previous:From: Nicolas AragonDate: 1999-04-20 00:53:36
Subject: Re: [INTERFACES] Delphi TDataset

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group