Re: drop tablespace failed when location contains .. on win32 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: drop tablespace failed when location contains .. on win32
Date
Msg-id 684309.1643649536@sss.pgh.pa.us
Whole thread Raw
In response to Re: drop tablespace failed when location contains .. on win32  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 1/30/22 16:50, Tom Lane wrote:
>> Here's a revised patch version that does it like that.  I also
>> reviewed and simplified the canonicalize_path logic.  I think
>> this is committable.

> LGTM

Pushed, thanks for looking.

I think I'm also going to have a look at simplifying some of the
dependent code, just because it feels weird to leave that unfinished.
In particular, Shenhao-san suggested upthread that we could remove
path_contains_parent_reference().  I complained about that at the
time, but I hadn't quite absorbed the fact that an absolute path
is now *guaranteed* not to have any ".." after canonicalize_path.
So the existing calls in adminpack.c and genfile.c are certainly
dead code.  We probably want to keep path_contains_parent_reference()
in case some extension is using it, but seeing that its API spec
already requires the input to be canonicalized, it could be simplified
to just check for ".." at the start.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: CREATEROLE and role ownership hierarchies
Next
From: Mark Dilger
Date:
Subject: Re: CREATEROLE and role ownership hierarchies