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

compiling a file by creating a shared library(adding new data type)

From: Mogin Mohandas <moginmo(at)gmail(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: compiling a file by creating a shared library(adding new data type)
Date: 2005-07-27 07:32:07
Message-ID: fd2290fd05072700324212bc6c@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-ports
Hi
   I was trying to build a new base data type into postgres. i am
using 7.4.8 on debian. There is already an eg in src/tutorial which
gives code for intenal and external functions of a new type called
complex. I tried to create a shared library for the file complex.c
using  "cc -fpic -c complex.c" and "cc -shared -o complex.so
complex.c".  That gave me a lot of errors like the header files
"fmgr.h" and "postgres.h" did not exist. I did a "make" anyway.
                     After that I went into postgres and tried to
create the functions corresponding to the new type. It says the file
complex.so could not be found. So the shared library seems to have not
been created.
      When I installed postgres-7.4.8 there was some error when I
gave "make install-all-headers", so I just did "make install". I think
the header files required for server side development are not there
due to that. I think they are still there in the include dir. How do I
use those header files when I make a shared library and compile. If
anybody has created datatypes and defined them please share your
experience.
Thank you
Moginraj

pgsql-ports by date

Next:From: Mogin MohandasDate: 2005-07-27 20:48:40
Subject: compiling c files
Previous:From: OpenMacNewsDate: 2005-07-26 17:05:52
Subject: starting PgSQL w/ launchd on OSX 10.4.2

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