Book Image

PostgreSQL Server Programming - Second Edition

Book Image

PostgreSQL Server Programming - Second Edition

Overview of this book

Table of Contents (21 chapters)
PostgreSQL Server Programming Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Writing functions in C++


It is a bad idea to mix PostgreSQL with C++ for a number of reasons. It is better to wrap your C++ code into C code behind extern C functions. This can be a problem if you heavily use templates and libraries like boost.

For more discussion on use of C++ read the PostgreSQL documentation here http://www.postgresql.org/docs/current/static/xfunc-c.html#EXTEND-CPP.