| From: | Japin Li <japinli(at)hotmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Use TEXT_DUMP_HEADER macro instead of hard-coded string in pg_backup_archiver.c |
| Date: | 2026-06-03 07:58:01 |
| Message-ID: | SY7PR01MB109213729ED3B2250E080D8A6B6132@SY7PR01MB10921.ausprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I noticed that in pg_backup_archiver.c, RestoreArchive() writes the dump header
using a hard-coded string:
ahprintf(AH, "--\n-- PostgreSQL database dump\n--\n\n");
However, the macro TEXT_DUMP_HEADER (defined in the same file) already contains
exactly the same content. To keep the code consistent and maintainable, this
patch replaces the hard-coded string with the macro.
A hard-coded version of TEXT_DUMPALL_HEADER exists in pg_dumpall.c, but since
it spans multiple files, it is left untouched.
--
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Use-TEXT_DUMP_HEADER-instead-of-hard-coded-dump-h.patch | text/x-patch | 937 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jelte Fennema-Nio | 2026-06-03 08:03:55 | Re: PSA: Planning to grease protocol connections during 19beta |
| Previous Message | Fujii Masao | 2026-06-03 07:55:07 | Re: Fix regression in vacuumdb --analyze-in-stages for partitioned tables |