Missing declaration of _PG_init()

From: Jack Orenstein <jao(at)geophile(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Missing declaration of _PG_init()
Date: 2021-01-08 14:49:44
Message-ID: CAGNxcasojEnJ2FXaCh4Z30kjiXYU5wLh8H+9JAs4cszq9=aspQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am writing an extension. The docs describe a _PG_init function that will
be called upon
loading the shared library (https://www.postgresql.org/docs/12/xfunc-c.html)
I include
postgres.h and fmgr.h, but on compilation, _PG_init has not been declared.
Grepping the postgres source, _PG_init appears to be involved in
programming language extensions, and the function is declared in plpgsql.h.
Looking at various contrib modules, I see
explicit declarations of _PG_init(void).

Should _PG_init(void) be declared in someplace included by postgres.h or
fmgr.h?

Jack Orenstein

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2021-01-08 15:32:22 Re: Suggestion: provide a "TRUNCATE PARTITION" command
Previous Message Thomas Kellerer 2021-01-08 14:40:07 Re: Suggestion: provide a "TRUNCATE PARTITION" command