From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Create function prototype as part of PG_FUNCTION_INFO_V1 |
Date: | 2014-02-15 13:51:15 |
Message-ID: | 20140215135115.GH20973@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-01-15 00:41:41 -0500, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > This idea has appeared at least twice now, in
> > http://www.postgresql.org/message-id/1386301050.2743.17.camel@vanquo.pezone.net and http://www.postgresql.org/message-id/52D25AA2.50108@2ndquadrant.com . Even if it doesn't help with Windows issues, as discussed in the second thread, it still seems like a win for reducing boilerplate and accidental compiler warnings. So here is a patch for consideration.
>
> Meh. I don't think that extension authors are really going to appreciate
> changing from "thou shalt declare all thy functions" to "thou shalt
> declare none of them". If the code were such that it wouldn't matter
> whether a manual declaration were provided too, then that wouldn't be a
> big deal --- but you seem to be ignoring the discussion in the one thread
> cited above about PGDLLEXPORT.
>
> Also, surely it is 100% bogus for fmgr.h to be declaring functions not
> actually provided by fmgr.c. That will create about as many failure
> modes as it removes, not to mention being conceptually wrong.
>
> The latter point might possibly be worked around by putting the externs
> for _PG_init and _PG_fini into the PG_MODULE_MAGIC macro, though I'm not
> sure how well that works for multi-source-file extensions; the init
> functions might be in some other file than the PG_MODULE_MAGIC call.
Based on those comments and the lack of counter arguments after a month
I am going to mark the patch as rejected.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-02-15 14:04:12 | Re: Exposing currentTransactionWALVolume |
Previous Message | Andres Freund | 2014-02-15 13:46:07 | Re: [9.3 bug] disk space in pg_xlog increases during archive recovery |