X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA43D52F19 for ; Wed, 27 Jul 2005 04:32:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65861-06 for ; Wed, 27 Jul 2005 07:32:08 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by svr1.postgresql.org (Postfix) with ESMTP id BB0FB52F13 for ; Wed, 27 Jul 2005 04:32:06 -0300 (ADT) Received: by rproxy.gmail.com with SMTP id i8so179883rne for ; Wed, 27 Jul 2005 00:32:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Zs2cO8YAC2grzYrnBhdQP5OoDqSK97aKUxmVrcrWy81SkyDxCC7iPUH5mPHMUVmswmTzLAanVYGy1LyMt4omMUT59lh3xhZkZkVZpPQDO63rtvNn8i4iIeCGVvyToIHTV/hTVgJUY3oiEoN0axdaMRtE60P5j7dDUg/exMxzIKM= Received: by 10.38.97.1 with SMTP id u1mr346038rnb; Wed, 27 Jul 2005 00:32:07 -0700 (PDT) Received: by 10.38.208.4 with HTTP; Wed, 27 Jul 2005 00:32:07 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2005 02:32:07 -0500 From: Mogin Mohandas Reply-To: Mogin Mohandas To: pgsql-ports@postgresql.org Subject: compiling a file by creating a shared library(adding new data type) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200507/22 X-Sequence-Number: 2162 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