Re: Non-text mode for pg_dumpall - Mailing list pgsql-hackers

From Mahendra Singh Thalor
Subject Re: Non-text mode for pg_dumpall
Date
Msg-id CAKYtNAp+SBSVENOtvEqpAcZCeQZhNZFU005Jy5-eP+2kC-3ryA@mail.gmail.com
Whole thread
In response to Re: Non-text mode for pg_dumpall  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Non-text mode for pg_dumpall
List pgsql-hackers
On Tue, 3 Mar 2026 at 14:55, Peter Eisentraut <peter@eisentraut.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

pgsql-hackers by date:

Previous
From: "Jonathan Gonzalez V."
Date:
Subject: Re: [oauth] Add TLS support to OAuth tests
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition