Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EE2CD9F9B54 for ; Mon, 3 Sep 2007 11:47:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54320-04 for ; Mon, 3 Sep 2007 11:47:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ironport2-out.pppoe.ca (ironport2-out.pppoe.ca [206.248.154.182]) by postgresql.org (Postfix) with ESMTP id 7213B9F9B14 for ; Mon, 3 Sep 2007 11:47:47 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAAe720bO+Igp/2dsb2JhbACCcA X-IronPort-AV: E=Sophos;i="4.20,202,1186372800"; d="scan'208,217";a="5943857" Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 03 Sep 2007 10:47:43 -0400 Received: from [206.248.136.41] ([206.248.136.41]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id IXY45744; Mon, 03 Sep 2007 10:47:44 -0400 Message-ID: <46DC1E8F.6040507@mark.mielke.cc> Date: Mon, 03 Sep 2007 10:47:43 -0400 From: Mark Mielke User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: Tom Lane CC: Magnus Hagander , Gregory Stark , Oleg Bartunov , Pavel Stehule , PostgreSQL Hackers Subject: Re: tsearch filenames unlikes special symbols and numbers References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com> <18259.1188773171@sss.pgh.pa.us> <87y7foir7t.fsf@oxford.xeocode.com> <19257.1188777110@sss.pgh.pa.us> <87tzqci6tp.fsf@oxford.xeocode.com> <20070903075609.GD21833@svr2.hagander.net> <1692.1188826039@sss.pgh.pa.us> In-Reply-To: <1692.1188826039@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------010803090604010206080904" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/88 X-Sequence-Number: 107240 This is a multi-part message in MIME format. --------------010803090604010206080904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tom Lane wrote: > Magnus Hagander writes: > >> On Mon, Sep 03, 2007 at 07:47:14AM +0100, Gregory Stark wrote: >> >>> Actually I think in Windows \ : and . are problems (not allowed more >>> than one dot in dos). >> \ and : are problems. >> > Is : really a problem, given that the name in question will be appended > to a known directory's path? > The file name shouldn't have a ':' in it. Accessing a path with multiple ':' in it to open a file for reading should just fail normally. So yes, there should be no problem. >> . is not a problem. We don't support 16-bit windows anyway, and multiple >> dots works fine on any system we support. >> > I'm not convinced that . is issue-free. On most if not all versions of Unix, > you are allowed to open a directory as a file and read the filenames it > contains. While I don't say it'd be easy to manage that through > tsearch, there's at least a potential for discovering the filenames > present in . and .. --- how much do we care about that? > No more than discovering the file names in any other directory without using '.' or '..'? If it matters, check to ensure it is a regular file before opening it? Cheers, mark -- Mark Mielke --------------010803090604010206080904 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Tom Lane wrote:
Magnus Hagander <magnus@hagander.net> writes:
  
On Mon, Sep 03, 2007 at 07:47:14AM +0100, Gregory Stark wrote:
    
Actually I think in Windows \ : and . are problems (not allowed more
than one dot in dos).
\ and : are problems.
    
Is : really a problem, given that the name in question will be appended
to a known directory's path?
  
The file name shouldn't have a ':' in it. Accessing a path with multiple ':' in it to open a file for reading should just fail normally. So yes, there should be no problem.

. is not a problem. We don't support 16-bit windows anyway, and multiple
dots works fine on any system we support.
    
I'm not convinced that . is issue-free.  On most if not all versions of Unix,
you are allowed to open a directory as a file and read the filenames it
contains.  While I don't say it'd be easy to manage that through
tsearch, there's at least a potential for discovering the filenames
present in . and .. --- how much do we care about that?
  
No more than discovering the file names in any other directory without using '.' or '..'? If it matters, check to ensure it is a regular file before opening it?

Cheers,
mark

-- 
Mark Mielke <mark@mielke.cc>
--------------010803090604010206080904--