Re: Small fixes for incorrect error messages - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Small fixes for incorrect error messages
Date
Msg-id ed8ff209-98f5-485e-92bf-8a5dcbf1727b@eisentraut.org
Whole thread Raw
In response to Small fixes for incorrect error messages  ("zengman" <zengman@halodbtech.com>)
Responses Re: Small fixes for incorrect error messages
List pgsql-hackers
On 05.02.26 07:51, zengman wrote:
> ```
>       if (fstat(fd, &statbuf) < 0)
> -        pg_fatal("could not open file \"%s\" for reading: %m",
> +        pg_fatal("could not stat file \"%s\" for reading: %m",
>                    fullpath);
> ```

It doesn't make sense to "stat a file for reading".  The changed message 
should probably just be

 > +        pg_fatal("could not stat file \"%s\": %m",
 >                    fullpath);




pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: refactor architecture-specific popcount code
Next
From: "zengman"
Date:
Subject: Re: Small fixes for incorrect error messages