Re: Missing declaration of _PG_init()
От
Laurenz Albe
Тема
Re: Missing declaration of _PG_init()
Дата
Msg-id
383f611b58a17220a82ebf8adfbadf4f6c116d4b.camel@cybertec.at
Ответ на
Missing declaration of _PG_init() (Jack Orenstein)
Список
Дерево обсуждения
Missing declaration of _PG_init() Jack Orenstein <jao@geophile.com>
Re: Missing declaration of _PG_init() Tom Lane <tgl@sss.pgh.pa.us>
Re: Missing declaration of _PG_init() Laurenz Albe <laurenz.albe@cybertec.at>
On Fri, 2021-01-08 at 09:49 -0500, Jack Orenstein wrote: > 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? It is provided by your module, so it must be declared by your module: extern void _PG_init(void); Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com
В списке pgsql-general по дате отправления