Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3zud-0007e7-G9 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2014 03:16:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W3zuc-0007ko-RF for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Jan 2014 03:16:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3zua-0007kd-1K for pgsql-hackers@postgresql.org; Fri, 17 Jan 2014 03:16:00 +0000 Received: from outmail149043.authsmtp.co.uk ([62.13.149.43]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W3zuU-0005Oe-Vs for pgsql-hackers@postgresql.org; Fri, 17 Jan 2014 03:15:59 +0000 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt17.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s0H3Fp3O037875; Fri, 17 Jan 2014 03:15:51 GMT Received: from ayaki.localdomain (gw3.metromesh.com.au [110.5.117.244]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s0H3FfN6095345 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 17 Jan 2014 03:15:48 GMT Message-ID: <52D8A05C.5080504@2ndquadrant.com> Date: Fri, 17 Jan 2014 11:15:40 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Robert Haas , Andres Freund CC: "pgsql-hackers@postgresql.org" Subject: Re: Changeset Extraction v7.0 (was logical changeset generation) References: <20140115002223.GA17204@awork2.anarazel.de> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Server-Quench: aad41213-7f25-11e3-b802-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZeVg0b BQteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadRtFaQJbZ1hf HGQLWlBEUF57WGZ/ bgofbARdfE9QXgRt TkpNRk1QEQdtHh1P RR5mUW8kCQNGcXtz YUMsVnJYXgorJBJ5 Q0xVFnABM2VldWEe BUNFJQtUch5Kfh1A Y1AuVXZZMGJJBC9q VzwTFhsSEA9kHWx+ QggLIl8JTFpDMy4g XRkJATQoGwUbGGNr Z1w5I0VUGEEeM047 NRMqWVsePBIJBxEW EExLDTVQO1gGQWtD X-Authentic-SMTP: 61633235383639.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 110.5.117.244/2525 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 01/16/2014 02:28 AM, Robert Haas wrote: > - If you address /* FIXME: apply sanity checking to slot name */, then > I think that also addresses /* XXX: do we want to use truncate > identifier instead? */. In other words, let's just error out if the > name is too long. I'm not sure what other sanity checking is needed > here; maybe just restrict it to 7-bit characters to avoid problems > with encodings for individual databases varying. It's a common misunderstanding that restricting to 7-bit solves encoding issues. Thanks to the joy that is SHIFT_JIS, we must also disallow the backslash and tilde characters. Anybody who actually uses SHIFT_JIS as an operational encoding, rather than as an input/output encoding, is into pain and suffering. Personally I'd be quite happy to see it supported as client_encoding, but forbidden as a server-side encoding. That's not the case right now - so since we support it, we'd better guard against its quirks. slotnames can't be regular identifiers, because they might contain chars not valid in another DB's encoding. So lets just restrict them to [a-zA-Z0-9_ -] and be done with it. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers