Re: Create function prototype as part of PG_FUNCTION_INFO_V1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Create function prototype as part of PG_FUNCTION_INFO_V1
Дата
Msg-id 31076.1397504380@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> 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);

According to
http://www.postgresql.org/message-id/52D25AA2.50108@2ndquadrant.com

the latter fails outright.  Which is problematic because that'd be the
more common case (particularly if you put manually-written externs in a
header file).  So while we could do this, and it'd probably be an
improvement in the very long run, it'd definitely cause pain in the short
run.  Not sure if it's worth it.

I still wish we could get rid of this problem by fixing the Windows build
recipes so that the PGDLLEXPORT marking wasn't needed.  We proved to
ourselves recently that getting rid of PGDLLIMPORT on global variables
wouldn't work, but I'm not sure that the function end of it was really
investigated.
        regards, tom lane



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

Предыдущее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Следующее
От: kelas
Дата:
Сообщение: JSONB in-place updates?