Re: [HACKERS] Extending PostgreSQL in C or C++

2003-06-18 Thread Christof Petig
Tom Lane wrote: Sebastien Lemieux <[EMAIL PROTECTED]> writes: Then I get: ERROR: Can't find function add_one in file /[PathToTheObject]/pgsql_bio.so Hmm. I can't see anything wrong with what you did, either. It's possible that the dynamic linker has printed additional messages to the backend'

Re: [HACKERS] Extending PostgreSQL in C or C++

2003-06-17 Thread Andreas Pflug
David Blasby wrote: 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

Re: [HACKERS] Extending PostgreSQL in C or C++

2003-06-17 Thread Tom Lane
Sebastien Lemieux <[EMAIL PROTECTED]> writes: > Then I get: > ERROR: Can't find function add_one in file /[PathToTheObject]/pgsql_bio.so Hmm. I can't see anything wrong with what you did, either. It's possible that the dynamic linker has printed additional messages to the backend's stderr. Mak

Re: [HACKERS] Extending PostgreSQL in C or C++

2003-06-17 Thread David Blasby
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

[HACKERS] Extending PostgreSQL in C or C++

2003-06-17 Thread Sebastien Lemieux
Hi, I need to extend postgreSQL to support some specific function I will code in C (ideally C++ if it can work!). I'm trying to run some simple test and it doesn't seem to work. Here is the C code: -- #include "postgres.h" #include int add_one(int arg) { return arg + 1; } --