Re: Postgresql init and cleanup module functions

From: Andres Freund <andres(at)anarazel(dot)de>
To: Yan Pas <yanp(dot)bugz(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql init and cleanup module functions
Date: 2017-09-05 18:28:56
Message-ID: 20170905182856.ymmj2wtzeonfb4m5@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2017-09-05 20:15:57 +0300, Yan Pas wrote:
> I'm writing C postgresql module with some psql-functions and global state.
> Do module API provide any init and cleanup functions? If yes then it would
> be fine to see them in "35.9. C-Language Functions" help page."

The relevant doc page is at
https://www.postgresql.org/docs/current/static/xfunc-c.html

what you're looking for is _PG_init(). There effectively is no cleanup
logic, as modules cannot be unloaded anymore.

- Andres

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2017-09-06 00:21:42 Re: BDR, wal segment has been removed, is it possible move forward?
Previous Message milist ujang 2017-09-05 17:52:14 BDR, wal segment has been removed, is it possible move forward?