Re: Why does load_external_function() return PGFunction?

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: Why does load_external_function() return PGFunction?
Дата
Msg-id
20180207065458.sowsqipstl7kinhf@alap3.anarazel.de
Ответ на
Список
Дерево обсуждения
Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Robert Haas <robertmhaas@gmail.com>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
Re: Why does load_external_function() return PGFunction? Tom Lane <tgl@sss.pgh.pa.us>
Re: Why does load_external_function() return PGFunction? Andres Freund <andres@anarazel.de>
On 2018-02-06 15:43:29 -0500, Tom Lane wrote:
> Andres Freund  writes:
> > We've several callers to load_external_function() that do not use the
> > returned value as a PGFunction. I'd vote for changing the return type to
> > void * and have fmgr.c cast it to PGFunction after verifying the
> > function's magic.
> 
> void* isn't necessarily compatible with function pointers --- there are
> platforms where they're physically different widths, though possibly
> you'd never get PG to run on such hardware anyway.

Fair point. Although we're relying on dlsym like infrastructure, which
returns just a void *.


> However, given that a cast is going to be necessary anyway, it seems
> like this is mostly useless churn...

Ok, can live with that too. Just though it was a bit weird...

Greetings,

Andres Freund

В списке pgsql-hackers по дате отправления
От: Pavel Stehule
Дата:
От: Amit Khandekar
Дата:
FAQ