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

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>
Cc: "wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com>, Julien Rouhaud <rjuju123@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-31T16:58:00Z
Lists: pgsql-hackers
On 1/30/22 16:50, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> In order to make the tests cheap, there is no need to have a separate
>> module in src/test/modules/ as your patch 0002 is doing.  Instead, you
>> should move the C code of your SQL function test_canonicalize_path()
>> to src/test/regress/regress.c, then add some tests in
>> src/test/regress/sql/, with a SQL function created in the test script
>> that feeds from what would be added to regress.so.
> 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


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Commits

  1. Simplify coding around path_contains_parent_reference().

  2. Make canonicalize_path() more canonical.