From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: A micro-optimisation for walkdir()
Date: Fri, 4 Sep 2020 16:28:49 -0400
Message-ID: <20200904202849.GA17763@alvherre.pgsql> (raw)
In-Reply-To: <CAC+AXB2Wve5=AxY=_khxoDAK7rq91fKKCD4i29JWjX8DTwpkXw@mail.gmail.com>
On 2020-Sep-04, Juan José Santamaría Flecha wrote:
> On Fri, Sep 4, 2020 at 9:37 PM Alvaro Herrera <alvherre@2ndquadrant.com>
> wrote:
>
> > On 2020-Sep-04, Thomas Munro wrote:
> > >
> > > +/* File types for 'd_type'. */
> > > +enum
> > > + {
> > > + DT_UNKNOWN = 0,
> > > +# define DT_UNKNOWN DT_UNKNOWN
> >
> > Uhm ... what do these #defines do? They look a bit funny.
> >
> > Would it make sense to give this enum a name, and then use that name in
> > struct dirent's definition, instead of unsigned char?
>
> They mimic POSIX dirent.h. I would rather stick to that.
Ah ... they do?
If you remove the #define lines, what happens to your patch?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, juanjo.santamaria@gmail.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: A micro-optimisation for walkdir()
In-Reply-To: <20200904202849.GA17763@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox