pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ilya Anfimov <ilan@tzirechnoy.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: develop a extension with cpp?
Date: Wed, 3 Nov 2021 01:11:34 +0300
Message-ID: <20211102221133.GA2571211@azor.tzirechnoy.ru> (raw)
In-Reply-To: <1743125197.2944577.1635816682155@mail.yahoo.com>
References: <1743125197.2944577.1635816682155.ref@mail.yahoo.com>
	<1743125197.2944577.1635816682155@mail.yahoo.com>

On Tue, Nov 02, 2021 at 01:31:22AM +0000, huangning290@yahoo.com wrote:
>    Hi
>        if i can develop a extension with cpp language?
>    regards!

 Generally,  like  in  any other language. Write files, use calls
and APIs available inside Postgres, compile  it  and  install  to
postgres directory.

 The  only one I know of as of now is https://github.com/postgrespro/rusmorph

 And it's not an example of a well-documented extension, unfortu-
nately.

 Hoewever,  it  works.  It's possible that you can find some more
examples on pgxn.org

 Also, probably you would need to compile it with

USE_PGXS=1 make with_llvm=no

 While  the USE_PGXS=1 is a standard way to compile extension out
of the postgres source tree, the with_llvm=no is a workaround  of
some bug in the llvm-7, that doesn't allow JIT compilation of C++
code.






view thread (4+ messages)  latest in thread

Message-ID: <20211102221133.GA2571211@azor.tzirechnoy.ru>
Permalink:  ../20211102221133.GA2571211@azor.tzirechnoy.ru/
Also on:    postgresql.org/message-id/20211102221133.GA2571211@azor.tzirechnoy.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ilan@tzirechnoy.com
  Subject: Re: develop a extension with cpp?
  In-Reply-To: <20211102221133.GA2571211@azor.tzirechnoy.ru>
  References: <1743125197.2944577.1635816682155.ref@mail.yahoo.com> <1743125197.2944577.1635816682155@mail.yahoo.com> <20211102221133.GA2571211@azor.tzirechnoy.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox