pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew Hagerty <matthew@venux.net>
To: pgsql-interfaces@postgreSQL.org
Subject: Compiling a function
Date: Tue, 20 Apr 1999 02:41:36 -0400
Message-ID: <4.1.19990420023358.00b5c340@mail.venux.net> (raw)

Greetings,

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 2.7.2.1.  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)
        return(1);
    else
        return(0);
}

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

Thanks,
Matthew Hagerty



view thread (4+ messages)  latest in thread

Message-ID: <4.1.19990420023358.00b5c340@mail.venux.net>
Permalink:  ../4.1.19990420023358.00b5c340@mail.venux.net/
Also on:    postgresql.org/message-id/4.1.19990420023358.00b5c340@mail.venux.net

 · 

reply

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-interfaces@postgresql.org
  Cc: matthew@venux.net
  Subject: Re: Compiling a function
  In-Reply-To: <4.1.19990420023358.00b5c340@mail.venux.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