Andrew Dunstan <and...@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