| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net>, jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Vaibhav Dalvi <vaibhav(dot)dalvi(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Non-text mode for pg_dumpall |
| Date: | 2026-03-03 09:25:06 |
| Message-ID: | 016819c0-666e-42a8-bfc8-2b93fd8d0176@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I noticed this cast in the committed code:
> + num_total_db = get_dbname_oid_list_from_mfile((char *) inputFileSpec,
> &dbname_oid_list);
The cast drops the const qualifier from inputFileSpec.
get_dbname_oid_list_from_mfile() writes into the space pointed to by its
argument, so it's really not "const". (And inputFileSpec points into
argv, so this ends up writing directly into argv.)
Please see if you can clean this up. It might be best if
get_dbname_oid_list_from_mfile() made a copy of its argument that it can
write into, and then the argument can be "const".
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-03-03 09:29:11 | Re: Skipping schema changes in publication |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-03-03 09:17:16 | RE: BUG: Former primary node might stuck when started as a standby |