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

Shared lib grief with 6.4.2

From: Matthew Hagerty <matthew(at)venux(dot)net>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Shared lib grief with 6.4.2
Date: 1999-05-26 03:54:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

I'm trying to create a simple function for postgres-6.4.2 under
FreeBSD-3.1-RELEASE and GCC-  This is the program code, simply
converts a bool to int4:

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

bool2int(bool bCondition)
    if (bCondition)

Then on the command line to create the shared lib and a file command to
ensure I created a shared lib:

# gcc -shared -I../include -o bool2int.c
# file ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD),
not stripped

Then in psql:

=> create function bool2int(bool) returns int4 as
'/usr/local/pgsql/procs/' language 'c';
=> select bool2int(1=1);
ERROR:  Can't find function bool2int in file /usr/local/pgsql/procs/

Any insight as to why this does not work would be greatly appreciated.

Thank you,
Matthew Hagerty


pgsql-interfaces by date

Next:From: Jason LamDate: 1999-05-26 04:28:45
Subject: Problems with libpq
Previous:From: James KinneyDate: 1999-05-25 21:42:07
Subject: unsubscribe

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