| From: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, jian he <jian(dot)universality(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 11:17:52 |
| Message-ID: | CAKYtNAp+SBSVENOtvEqpAcZCeQZhNZFU005Jy5-eP+2kC-3ryA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 3 Mar 2026 at 14:55, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> 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".
>
Thanks Peter.
Here, I am attaching a patch to fix this issue.
--
Thanks and Regards
Mahendra Singh Thalor
EnterpriseDB: http://www.enterprisedb.com
| Attachment | Content-Type | Size |
|---|---|---|
| v01_pg_restore-don-t-edit-inputfile-name-instead-use-local.patch | text/x-patch | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Henson Choi | 2026-03-03 11:32:51 | Re: Row pattern recognition |
| Previous Message | Jonathan Gonzalez V. | 2026-03-03 11:15:03 | Re: [oauth] Add TLS support to OAuth tests |