Re: [GENERAL] C User Defined Functions

2014-01-11 Thread Craig Ringer
> Hey, > > I was trying to compile a user-defined function in C (I am trying to > compile one of the examples given in chapter 35.9 of the 9.3beta2 > documentation) using Microsoft Visual Studio Express 2012 on a 64-bit > Windows 7 computer. > > I ran into the following error: > > C:\>cl /I "C:\

Re: [GENERAL] C++ User-defined functions

2010-08-11 Thread 3dmashup
This information is correct the header file libintl.h is NOT included in the binary distro. For a workaround, you can create an empty libintl.h file in local header directory and add that dir to the include path. When compilinga server side C function with VS2010 or VS2005 The struct redef

Re: [GENERAL] C++ User-defined functions

2010-08-11 Thread 3dmashup
This information is correct the header file libintl.h is NOT included in the binary distro. For a workaround, you can create an empty libintl.h file in local header directory and add that dir to the include path. -- View this message in context: http://postgresql.1045698.n5.nabble.com/C-User

Re: [GENERAL] C++ User-defined functions

2009-03-11 Thread George Oakman
nclude\server\pg_config_os.h(197) : see declaration of 'itimerval' Any advice most welcome. Thanks, George. > Date: Tue, 10 Mar 2009 11:42:39 +0900 > From: cr...@postnewspapers.com.au > To: mag...@hagander.net > CC: oakm...@hotmail.com; pgsql-general@p

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Tom Lane
Craig Ringer writes: > Tom Lane wrote: >> One thing you've got to be really wary of is C++ exceptions, >> which tend not to interoperate nicely with PG's longjmp-based error >> handling. > Hmm, that does sound problematic. You can always build with > -fno-exceptions (gcc; I think other compilers

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Craig Ringer
Magnus Hagander wrote: > George Oakman wrote: >> Thanks Craig, >> >> I'm trying to compile a very simple test with Visual Studio (2008), but >> I get the following errors: > > The PostgreSQL backend and header files are not compatible with Visual > Studio 2008. At least they're not tested wit h

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Craig Ringer
Tom Lane wrote: > One thing you've got to be really wary of is C++ exceptions, > which tend not to interoperate nicely with PG's longjmp-based error > handling. Hmm, that does sound problematic. You can always build with -fno-exceptions (gcc; I think other compilers offer related options) and ado

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Magnus Hagander
George Oakman wrote: > Thanks Craig, > > I'm trying to compile a very simple test with Visual Studio (2008), but > I get the following errors: The PostgreSQL backend and header files are not compatible with Visual Studio 2008. At least they're not tested wit hit. You need to try Visual Studio 2

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread George Oakman
_RETURN_INT32(arg + 1); } If you can help, that would be wonderful. Thanks a lot, George. > Date: Tue, 10 Mar 2009 02:35:34 +0900 > From: cr...@postnewspapers.com.au > To: oakm...@hotmail.com > CC: pgsql-general@postgresql.org > Subject: Re: [GENERAL] C++ User-defined fun

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Tom Lane
Craig Ringer writes: > There's lots more information about this on the Internet. Just look for > generic resources on calling C from C++ and vice versa. > (I don't *think* there are any issues with libstdc++, though you'd > probably have to make sure that no other program linked into Pg brings >

Re: [GENERAL] C++ User-defined functions

2009-03-09 Thread Craig Ringer
George Oakman wrote: > I am trying to write a user-defined function in C++. Most examples are give > in plain C. I would be very grafeful for a sample program/code-snippet in C++. It's just like any other C/C++ code mixing. You must make sure that any C-only headers are included within an `exter