Re: Why does load_external_function() return PGFunction?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why does load_external_function() return PGFunction?
Дата
Msg-id 16403.1518014110@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?
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-02-06 15:43:29 -0500, Tom Lane wrote:
>> 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 *.

Yeah.  Presumably, a platform where they were really different would have
to provide some unstandardized variant of dlsym for fetching function
pointers.  We could cope with that fairly easily as things stand, since
we have platform-specific wrappers for dlsym anyway.  But if we made the
API for the wrappers dependent on data and code pointers being the same,
we'd be in trouble.

            regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem