Re: PGDLLEXPORTing all GUCs?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: PGDLLEXPORTing all GUCs?
Дата
Msg-id 20140508120034.GH30324@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: PGDLLEXPORTing all GUCs?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2014-05-08 07:56:46 -0400, Robert Haas wrote:
> On Thu, May 8, 2014 at 12:19 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> > In terms of ugliness, would you be happier using a pg_extern instead of
> > extern, where we:
> >
> > #ifdef WIN32
> > #define pg_extern extern PGDLLIMPORT
> > #else
> > #define pg_extern extern
> > #endif
> >
> > ?
> 
> I personally would not be happier with that.  extern can be applied to
> function prototypes, not just variables, and even to function
> definitions.  When I see PGDLLIMPORT, I think, oh look, this is some
> kind of magic pixie dust that Windows requires us to sprinkle on our
> variables.  When I see pg_extern, I think, oh, this is the PostgreSQL
> version of extern, and it's not, really.

Well, it's actually "helpful" in some sense for functions too (one
trampoline less on windows). And given how postgres uses externs I think
it matches well with just PGDLLIMPORT everything.

> But I can live with it if it makes other people sufficiently happier.
> One way or another, I really do feel very strongly that we should push
> forward with broader PGDLLIMPORT-ification.  My experience mirrors
> Craig's: this is a very useful thing for extension developers.

Yea. I have been yelled at by jenkins far too many times. Exporting all
variables seems like the only way to significantly reduce the need for
!windows developers needing to care about windows.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pg_shmem_allocations view
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [v9.5] Custom Plan API