Re: Reduce the number of special cases to build contrib modules on windows - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Reduce the number of special cases to build contrib modules on windows
Date
Msg-id 202107271601.aojhkuiny6xn@alvherre.pgsql
Whole thread Raw
In response to Re: Reduce the number of special cases to build contrib modules on windows  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Responses Re: Reduce the number of special cases to build contrib modules on windows  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On 2021-Jul-27, Dagfinn Ilmari Mannsåker wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.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/



pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: Reduce the number of special cases to build contrib modules on windows
Next
From: John Naylor
Date:
Subject: Re: truncating timestamps on arbitrary intervals