Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 925329F9526 for ; Mon, 3 Sep 2007 20:50:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 58321-07 for ; Mon, 3 Sep 2007 20:49:59 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.188]) by postgresql.org (Postfix) with ESMTP id 95C309F9525 for ; Mon, 3 Sep 2007 20:50:06 -0300 (ADT) Received: by fk-out-0910.google.com with SMTP id b27so1620439fka for ; Mon, 03 Sep 2007 16:50:03 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oZCQfu9mUPDk/Va/sy+h4fps/r4s694UamjgbR4gyC5WRJz9WKMLhHk/zY3jSoQKWKcxRj2uqiTB/Jm0ZM7CftCLNOLELjsUQ894g0jKpq9wfMH07lllk73GvuwiabC2KdK/tkAh44oiSgKuKS1GMY4JFgoqcx2Xzys+d8u6X0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ny+2X0S9Fncx5wtd7tHGlpkHOnsvBOau+wrgkschOjs9M7UjB47Vb9iRebi6vGBWE3QmzMZG1duGeinEtmDdwSTlWkIoByC9Hv7G5qI6ze5966BAa+WjMSKW2VD0muYDIkOTn9ttg2Z0Xqdeu/EIycSNfMHH9ik+aIa+vfpGmBw= Received: by 10.82.134.12 with SMTP id h12mr1362655bud.1188863403465; Mon, 03 Sep 2007 16:50:03 -0700 (PDT) Received: by 10.82.118.15 with HTTP; Mon, 3 Sep 2007 16:50:03 -0700 (PDT) Message-ID: Date: Mon, 3 Sep 2007 16:50:03 -0700 From: "Ben Tilly" To: "Tom Lane" Subject: Re: tsearch filenames unlikes special symbols and numbers Cc: "Alvaro Herrera" , "Gregory Stark" , "Oleg Bartunov" , "Pavel Stehule" , "PostgreSQL Hackers" In-Reply-To: <24214.1188846905@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com> <18259.1188773171@sss.pgh.pa.us> <87y7foir7t.fsf@oxford.xeocode.com> <19257.1188777110@sss.pgh.pa.us> <20070903190302.GD10282@alvh.no-ip.org> <24214.1188846905@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/108 X-Sequence-Number: 107260 On 9/3/07, Tom Lane wrote: > Alvaro Herrera writes: > > On the other hand, this means the name has to be quoted if it would be > > quoted as an SQL identifier, right? > > Something like that. I wasn't planning on rejecting uppercase letters, > though, which would be necessary if you wanted to be strict about > matching unquoted identifiers. > > There seems fairly clear use-case for allowing A-Z a-z 0-9 and > underscore (while CVS head rejects 0-9 and underscore). There also seem > to be good arguments for disallowing / \ : on various platforms, which > leaves us with some other punctuation in question, as well as the whole > matter of non-ASCII characters. I'm not sure whether we want to touch > the idea of non-ASCII; comments? The problem with allowing uppercase letters is that on some filesystems foo and Foo are the same file, and on others they are not. This may lead to obscure portability problems where code worked fine on Unix and then fails when the database is running on Windows. The approach that I'd suggest is allow a very restricted subset as an immediate solution (say a-z and 0-9), and plan to later allow arbitrary data to be passed in, then be encoded in some way before hitting disk. (And later need not be much later - such encodings are not that hard to write.) Cheers, Ben