Re: tsearch filenames unlikes special symbols and numbers - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: tsearch filenames unlikes special symbols and numbers
Date
Msg-id 87tzqci6tp.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: tsearch filenames unlikes special symbols and numbers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: tsearch filenames unlikes special symbols and numbers
Re: tsearch filenames unlikes special symbols and numbers
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> "Tom Lane" <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Hash index todo list item
Next
From: "Pavel Stehule"
Date:
Subject: integrated tsearch has different results than tsearch2