Search Postgresql Archives

Re: C++ User-defined functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Craig Ringer <craig@xxxxxxxxxxxxxxxxxxxxx> 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
> in a different version of libstdc++.)

I believe this is fairly platform-dependent.  On platforms where the
standard libc includes everything you need for C++, you'd likely be okay,
but we've seen problems on (possibly obsolete?) platforms where it
doesn't.  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.

My own advice is to think twice about how badly your function needs to
be C++ rather than plain C.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux