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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, 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 16:01:04
Message-ID: 202107271601.aojhkuiny6xn@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Jul-27, Dagfinn Ilmari Mannsåker wrote:

> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:

> > + if (grep { $_ eq $ref} @{ $self->{references} } == 0)
>
> I disagree. Using grep in boolean context is perfectly idiomatic perl.
> What would be more idiomatic is List::Util::any, but that's not availble
> without upgrading List::Util from CPAN on Perls older than 5.20, so we
> can't use that.

I was wondering if instead of grepping the whole list for each addition
it would make sense to push always, and do a unique-ification step at
the end.

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2021-07-27 16:05:51 Re: truncating timestamps on arbitrary intervals
Previous Message Dagfinn Ilmari Mannsåker 2021-07-27 15:52:38 Re: Reduce the number of special cases to build contrib modules on windows