Re: tsearch filenames unlikes special symbols and numbers

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: tsearch filenames unlikes special symbols and numbers
Date: 2007-09-03 06:47:14
Message-ID: 87tzqci6tp.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>>> I made it reject all but latin letters, which is the same restriction
>>> that's in place for timezone set filenames. That might be overly
>>> strong, but we definitely have to forbid "." and "/" (and "\" on
>>> Windows). Do we want to restrict it to letters, digits, underscore?
>>> Or does it need to be weaker than that?
>
>> What's the problem with "."?
>
> ../../../../etc/passwd
>
> Possibly we could allow '.' as long as we forbade /,

Right, traditionally the only characters forbidden in filenames in Unix are /
and nul. If we want the files to play nice in Gnome etc then we should
restrict them to ascii since we don't know what encoding the gui expects.

Actually I think in Windows \ : and . are problems (not allowed more than one
dot in dos).

> There's a reasonable argument for restricting the names used for these
> things in the SQL definitions to be valid SQL identifiers, so that that
> will work nicely...

Ah

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Trevor Talbot 2007-09-03 07:26:09 Re: tsearch filenames unlikes special symbols and numbers
Previous Message Tom Lane 2007-09-02 23:51:50 Re: tsearch filenames unlikes special symbols and numbers

Browse pgsql-hackers by date

  From Date Subject
Next Message Anoo Sivadasan Pillai 2007-09-03 07:04:10 Re: FW: max_connections and shared_buffers
Previous Message Scott Marlowe 2007-09-03 06:47:03 Re: FW: max_connections and shared_buffers