RE: drop tablespace failed when location contains .. on win32

wangsh.fnst@fujitsu.com <wangsh.fnst@fujitsu.com>

From: "wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "michael@paquier.xyz" <michael@paquier.xyz>
Cc: "andrew@dunslane.net" <andrew@dunslane.net>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-26T08:40:15Z
Lists: pgsql-hackers

Attachments

Hi, 

> -----Original Message-----
> From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
> Sent: Monday, September 13, 2021 4:36 PM
> To: michael@paquier.xyz

> Mmm. I haven't thought that so seriously, but '/hoge/foo/bar' doesn't
> seem to be an absolute path on Windows since it lacks
> "<dirver-letter>:" or "//hostname" part.  If we're on drive D:,
> "/Program\ Files" doesn't mean "C:\Program\ Files" but "D:\Program\
> Files".

I don't know this.  After some test, I think it's better to consider '/hoge/foo/bar'
as a absolute path.

0001 and 0002 are the are the bugfix patches.
0003 is the test patch what I have tested on Linux and Windows.

Waiting for some comment.
Add to the commitfest: https://commitfest.postgresql.org/35/3331/

Regards,
Shenhao Wang

Commits

  1. Simplify coding around path_contains_parent_reference().

  2. Make canonicalize_path() more canonical.