Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../ - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
Date
Msg-id 22344.1341519037@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
I wrote:
> On reflection I think that what we need to do is fix it so that it only
> strips "../" from the tail string when there is a directory name
> available to be stripped from the head string.  Otherwise just stop
> trimming.

Actually, there is a much simpler fix: don't let it strip ".." at all.
There is no correctness reason to do that, and as for cosmetics, callers
who care can use canonicalize_path() to remove ".." correctly.  (AFAICS,
all existing callers of join_path_components already do so anyway.)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
Next
From: Payal Singh
Date:
Subject: Re: Problem with pg_upgrade