Re: BUG #18245: pg_restore accepts same output file name as input file name - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18245: pg_restore accepts same output file name as input file name
Date
Msg-id 2781744.1702565401@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18245: pg_restore accepts same output file name as input file name  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-bugs
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Wed, Dec 13, 2023 at 09:44:26AM +0100, Daniel Gustafsson wrote:
>> Something like the attached (untested) sketch should be enough I think.

> I'm wondering if it would be worth adding some canonicalize_path() calls while
> at it,  ISTM that such mistakes are likely to happen when invoking pg_restore
> manually, so having slightly different wording for the exact same file wouldn't
> surprising.

I'm a little dubious about the value of this; but if we're going to do
it, comparing post-canonicalize_path strings does seem like the right
way.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18247: Integer overflow leads to negative width
Next
From: Michael Zhilin
Date:
Subject: [BUG] false positive in bt_index_check in case of short 4B varlena datum