Re: C++ Trigger Framework

From: Shmuel Kamensky <shmuelkamensky(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: C++ Trigger Framework
Date: 2022-02-22 21:33:05
Message-ID: CAFOdk+CjLnmPz0rq7Og0au+NJTUvWdWQf7LDAAiGXxsH6xqHpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nathan,

Thanks for the reply. I did indeed read that document and it's a great
place to get started. But it doesn't quite answer my questions. Do you
personally have experience writing software in C++ that interacts with
Postgres?

On Tue, Feb 22, 2022, 23:07 Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:

> On Tue, Feb 22, 2022 at 04:02:39PM +0200, Shmuel Kamensky wrote:
> > I'm interested in creating a Postgres extension that would enable
> > developers to write triggers in (modern) C++. Does anyone know if there
> is
> > already some sort of translation wrapper between the native Postgres C
> > API's and C++? Or if there's already a project that allows for writing
> > triggers in C++ with ease?
> > I see that
> https://github.com/clkao/plv8js-clkao/blob/master/plv8_type.cc
> > does implement an abstraction of sorts, but it's specific to v8 types and
> > is not genericized as a way of interacting with Postgres C API's from C++
> > from *an*y C++ code.
> >
> > Can you imagine any potential technical challenges I may encounter (e.g.
> > massaging postgres' custom allocator to work with C++'s new and delete
> > operators, or unresolvable compiler incompatibilities)?
>
> This might answer your questions:
>
> https://www.postgresql.org/docs/devel/xfunc-c.html#EXTEND-CPP
>
> --
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-22 22:06:43 Re: making pg_regress less noisy by removing boilerplate
Previous Message Greg Stark 2022-02-22 21:12:15 Using operators to do query hints