| From: | zengman <zengman(at)halodbtech(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz> |
| Subject: | Small fixes for incorrect error messages |
| Date: | 2026-02-05 06:51:05 |
| Message-ID: | tencent_1EE1430B1E6C18A663B8990F@qq.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
I found a few easily overlooked error messages worth fixing, as follows:
01
```
if (!is_absolute_path(tsmap->new_dir))
- pg_fatal("old directory is not an absolute path in tablespace mapping: %s",
+ pg_fatal("new directory is not an absolute path in tablespace mapping: %s",
tsmap->new_dir);
```
02
```
if (rb < 0)
- pg_fatal("could not read from file \"%s\": %m", dst);
+ pg_fatal("could not read from file \"%s\": %m", src);
```
03
```
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);
```
--
regards,
Man Zeng
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-error-message-for-non-absolute-new-directory-in-.patch | application/octet-stream | 989 bytes |
| 0002-Fix-error-message-in-copy_file_blocks-to-reference-s.patch | application/octet-stream | 799 bytes |
| 0003-Fix-error-message-in-slurpFile-to-clarify-file-statu.patch | application/octet-stream | 810 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2026-02-05 06:51:20 | Re: Convert NOT IN sublinks to anti-joins when safe |
| Previous Message | jian he | 2026-02-05 06:15:25 | Re: CREATE TABLE LIKE INCLUDING TRIGGERS |