Re: Create function prototype as part of PG_FUNCTION_INFO_V1

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Create function prototype as part of PG_FUNCTION_INFO_V1
Дата
Msg-id 534DF9EB.9000108@gmx.net
обсуждение исходный текст
Ответ на Re: Create function prototype as part of PG_FUNCTION_INFO_V1  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Create function prototype as part of PG_FUNCTION_INFO_V1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 4/14/14, 3:28 PM, Peter Eisentraut wrote:
> On 4/4/14, 10:07 AM, Andres Freund wrote:
>> If
>> somebody previously tried to do the correct thing and attached
>> PGDLLEXPORT to their own *function* prototoype, it would cause problems
>> now.
> 
> What is the difference (on affected platforms) between
> 
> Datum funcname(PG_FUNCTION_ARGS);
> 
> and writing (effectively)
> 
> PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS);
> Datum funcname(PG_FUNCTION_ARGS);
> 
> or for that matter
> 
> Datum funcname(PG_FUNCTION_ARGS);
> PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS);
> 
> 
> If there isn't a difference, then my patch is fine.  Otherwise, it might
> be good to document the issues for extension authors.

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.

If it turns out that this might help someone optimize the Windows build,
then great.  But I gather it won't, so so what.  Or maybe it can be made
to work, in which case extension authors will get compiler errors about
places they need to clean up.  So it could still help that way, but who
knows, that's not the point.

If there are still concerns in this area, we could commit just the part
that adds the prototype to PG_FUNCTION_INFO_V1 and let that sit for a
while, and then remove the (now redundant) explicit prototypes in a
later release, so if there is a need to revert it, it won't be so big.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add TAP tests for client programs
Следующее
От: Amit Langote
Дата:
Сообщение: [doc] EXPLAIN CREATE MATERIALIZED VIEW AS?