Re: Create function prototype as part of PG_FUNCTION_INFO_V1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Create function prototype as part of PG_FUNCTION_INFO_V1
Date: 2014-04-16 03:45:55
Message-ID: 12295.1397619955@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Let me point out again that my patch doesn't actually do anything about
> PGDLLEXPORT or the like. It just adds automatic prototypes into
> PG_FUNCTION_INFO_V1, to reduce compiler warnings in extensions and
> reduce some boilerplate in general.

Hmm ... for some reason I had gotten it in my head that you were adding
PGDLLEXPORT to the autogenerated extern declarations, but at least the
version of the patch in <1389762012(dot)24046(dot)2(dot)camel(at)vanquo(dot)pezone(dot)net>
doesn't do that, so the point is moot.

I still object to the aspect of the patch that moves the externs for
_PG_init/_PG_fini into fmgr.h: that is conceptually wrong and will create
more confusion than the trivial code savings is worth. But I won't
complain if you commit the PG_FUNCTION_INFO_V1 changes.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2014-04-16 04:11:11 Re: Custom Scan APIs (Re: Custom Plan node)
Previous Message Kouhei Kaigai 2014-04-16 03:42:38 Re: Custom Scan APIs (Re: Custom Plan node)