Re: Extending PostgreSQL in C or C++ - Mailing list pgsql-hackers

From David Blasby
Subject Re: Extending PostgreSQL in C or C++
Date
Msg-id [email protected]
Whole thread Raw
In response to Extending PostgreSQL in C or C++  (Sebastien Lemieux <[email protected]>)
Responses Re: Extending PostgreSQL in C or C++
List pgsql-hackers
Sebastien Lemieux wrote:
> Hi,
> 
>   I need to extend postgreSQL to support some specific function I will 
> code in C (ideally C++ if it can work!). 

Be very carefull with using C++ functions inside postgresql.  If the C++ 
code throws an exception the postgresql backend will get a SIGABRT and 
terminate.

You can solve this by linking the std c++ library to the postmaster.  We 
tried everything we could think of to fix this, but this was the only 
solution that worked.

For a complete discussion, you can read the PostGIS (GIS spatial objects 
for Postgresql) mailing list (http://postgis.refractions.net) and the 
GEOS (Geometry Engine, Open Source) mailing list 
(http://geos.refractions.net).

dave



pgsql-hackers by date:

Previous
From: Mike Aubury
Date:
Subject: Re: ss_family in hba.c
Next
From: Tom Lane
Date:
Subject: Re: Extending PostgreSQL in C or C++