Re: Rationalizing declarations of src/common/ variables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rationalizing declarations of src/common/ variables
Date
Msg-id 1217276.1638198228@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rationalizing declarations of src/common/ variables  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Rationalizing declarations of src/common/ variables
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Nov 29, 2021 at 9:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> What's the value of introducing PGDLLIMPORT_FE? I mean suppose we just
>>> make PGDLLIMPORT expand to nothing in front-end code.

>> Hmm ... fair question.  It feels like that risks breaking something,
>> but offhand I can't see what, as long as we're certain that FRONTEND
>> is set correctly in every compile.

> If it isn't, your way might go wrong too, since it depends on FRONTEND
> being set correctly at least at the point when the PGDLLIMPORT_FE
> macro is defined.

Either of these ways would require that FRONTEND is already set correctly
when c.h is read.  But all of the hacks you mention do ensure that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Can I assume relation would not be invalid during from ExecutorRun to ExecutorEnd
Next
From: Kuntal Ghosh
Date:
Subject: Re: Add connection active, idle time to pg_stat_activity