Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: jgd(at)well(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
Date: 2012-07-05 20:10:37
Message-ID: 22344.1341519037@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Payal Singh 2012-07-05 20:24:28 Re: Problem with pg_upgrade
Previous Message balaji03 2012-07-05 19:57:50 BUG #6720: Its often disconnecting