Skip to content

Basic support for writing extensions in C++ #7

@mkindahl

Description

@mkindahl

What

Extensions for PostgreSQL are traditionally written in C, but in some cases you might want to write the extension in C++ but still interface with standard PostgreSQL code. Normally, you can just include the PostgreSQL file wrapped in extern "C", but it can be useful to have some additional tools to make it easy to do some of the work.

The use of setjmp/longjmp for error reporting makes it more complicated to use the full power of C++, but in many cases this is not necessarily a problem. For example, RAII model can be used for cases where functions cannot error out.

How

Some ideas for simplifications that might be useful.

  • C++ iterators for PostgreSQL List type

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions