Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WGySH-0006Qz-SG for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Feb 2014 22:20:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WGySH-0001xJ-9x for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Feb 2014 22:20:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WGySG-0001w6-3d; Fri, 21 Feb 2014 22:20:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WGyS9-00015e-Id; Fri, 21 Feb 2014 22:20:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s1LMK6Wd019843; Fri, 21 Feb 2014 17:20:06 -0500 From: Tom Lane To: Noah Misch cc: pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org, digoal@126.com Subject: Re: [HACKERS] Re: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding In-reply-to: <20140220043940.GA3064539@tornado.leadboat.com> References: <20140213140759.2710.49877@wrigleys.postgresql.org> <20127.1392324548@sss.pgh.pa.us> <12131.1392760137@sss.pgh.pa.us> <4385.1392859333@sss.pgh.pa.us> <20140220043940.GA3064539@tornado.leadboat.com> Comments: In-reply-to Noah Misch message dated "Wed, 19 Feb 2014 23:39:40 -0500" Date: Fri, 21 Feb 2014 17:20:06 -0500 Message-ID: <19842.1393021206@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Noah Misch writes: > On Wed, Feb 19, 2014 at 08:22:13PM -0500, Tom Lane wrote: >> How much of this is back-patch material, do you think? > None of it. While many of the failures to validate against a character > encoding are clear bugs, applications hum along in spite of such bugs and > break when we tighten the checks. I don't see a concern to override that > here. Folks who want the tighter checking have some workarounds available. That's certainly a reasonable position to take concerning the changes for outside-a-transaction behavior. However, I think there's a case to be made for adding the additional pg_verify_mbstr() calls in the back branches. We've been promising since around 8.3 that invalidly encoded data can't get into a database, and it's disturbing to find that there are leaks in that. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs