Re: Reduce the number of special cases to build contrib modules on windows

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reduce the number of special cases to build contrib modules on windows
Date: 2021-07-27 14:33:21
Message-ID: 265301.1627396401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> 0001: Removes an include directory for dblink. This appears like it's
> not needed. It was added in ee3b4188a (Jan 2010), but an earlier
> commit, 320c7eb8c (June 2008) seems to have made it pointless. It's
> still a mystery to me why ee3b4188a would have been required in the
> first place.

FWIW, I poked around in the mailing list archives around that date
and couldn't find any supporting discussion. It does seem like it
shouldn't be needed, given that dblink's Makefile does no such thing.

I'd suggest just pushing your 0001 and seeing if the buildfarm
complains.

> 0002: Parses -D in the CPPFLAGS of Makefiles and uses those in the
> MSVC script. It also adjusts the ltree contrib module so that we do
> the same LOWER_NODE behaviour as we did before. The MSVC scripts
> appear to have mistakenly forgotten to define LOWER_NODE as it is in
> the Makefiles.

The LOWER_NODE situation seems like a mess, but I think the right fix
is to remove -DLOWER_NODE from the Makefile altogether and move the
responsibility into the C code. You could have ltree.h do

#if !defined(_MSC_VER)
#define LOWER_NODE 1
#endif

and put the explanatory comment on that, not on the uses of the flag.

Haven't looked at the rest.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-07-27 15:00:36 Re: pg_settings.pending_restart not set when line removed
Previous Message Alvaro Herrera 2021-07-27 14:29:32 Re: pg_settings.pending_restart not set when line removed