Re: Small fixes for incorrect error messages
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: zengman <zengman@halodbtech.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Date: 2026-02-07T08:57:20Z
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);
Commits
-
Further error message fix
- 3e7bb39df7de 14.21 landed
- 9dcd0b3de14c 15.16 landed
- a7bdbbadac3b 16.12 landed
- 5449fd261ea8 17.8 landed
- cff2ef9845d6 18.2 landed
- 1653ce5236c4 19 (unreleased) landed
-
Fix some error message inconsistencies
- d32e17160971 14.21 landed
- 4ec943f7dcb0 15.16 landed
- 977a17a3eb33 16.12 landed
- 67ad4387b226 17.8 landed
- acfa422c3c1f 18.2 landed
- 74a116a79b47 19 (unreleased) landed