pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Kupershmidt <schmiddy@gmail.com>
Cc: jgd@well.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
Date: Thu, 05 Jul 2012 16:10:37 -0400
Message-ID: <22344.1341519037@sss.pgh.pa.us> (raw)
In-Reply-To: <18464.1341513777@sss.pgh.pa.us>
References: <E1SmFkY-0003pD-NX@wrigleys.postgresql.org>
	<9781.1341384106@sss.pgh.pa.us>
	<CAK3UJRF8cMdRJOES4EdhFwD5cuaK8NLjg09+G5ectoF6jLG4gg@mail.gmail.com>
	<18464.1341513777@sss.pgh.pa.us>

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



view thread (5+ messages)

Message-ID: <22344.1341519037@sss.pgh.pa.us>
Permalink:  ../22344.1341519037@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22344.1341519037@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, schmiddy@gmail.com, jgd@well.com
  Subject: Re: BUG #6715: 9.2b2 psql \ir does not understand leading ../
  In-Reply-To: <22344.1341519037@sss.pgh.pa.us>
  References: <E1SmFkY-0003pD-NX@wrigleys.postgresql.org> <9781.1341384106@sss.pgh.pa.us> <CAK3UJRF8cMdRJOES4EdhFwD5cuaK8NLjg09+G5ectoF6jLG4gg@mail.gmail.com> <18464.1341513777@sss.pgh.pa.us> <22344.1341519037@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox