Re: Small fixes for incorrect error messages

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: zengman <zengman(at)halodbtech(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Small fixes for incorrect error messages
Date: 2026-02-07 08:57:20
Message-ID: ed8ff209-98f5-485e-92bf-8a5dcbf1727b@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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);

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message zengman 2026-02-07 09:24:44 Re: Small fixes for incorrect error messages
Previous Message John Naylor 2026-02-07 08:54:31 Re: refactor architecture-specific popcount code