Re: PGDLLEXPORTing all GUCs?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PGDLLEXPORTing all GUCs?
Date: 2014-05-08 11:56:46
Message-ID: CA+TgmobT3CBxZADHD4A-G778-Z7WOQLgDfDyg5oU2LOfVhXLOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 8, 2014 at 12:19 AM, Craig Ringer <craig(at)2ndquadrant(dot)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.

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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-05-08 11:58:34 Re: pg_shmem_allocations view
Previous Message MauMau 2014-05-08 11:17:46 Re: [bug fix] pg_ctl always uses the same event source