Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHff8-0008Ki-8n for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Feb 2014 20:28:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WHff7-0006TC-JP for pgsql-bugs@arkaria.postgresql.org; Sun, 23 Feb 2014 20:28:33 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHff6-0006T3-T4; Sun, 23 Feb 2014 20:28:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WHff4-0002aY-9L; Sun, 23 Feb 2014 20:28:32 +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 s1NKSIwk018746; Sun, 23 Feb 2014 15:28:19 -0500 From: Tom Lane To: Noah Misch cc: pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org, digoal@126.com Subject: Re: Re: [HACKERS] Re: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding In-reply-to: <20140221234332.GB3088878@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> <19842.1393021206@sss.pgh.pa.us> <20140221234332.GB3088878@tornado.leadboat.com> Comments: In-reply-to Noah Misch message dated "Fri, 21 Feb 2014 18:43:32 -0500" Date: Sun, 23 Feb 2014 15:28:18 -0500 Message-ID: <18745.1393187298@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) 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 Fri, Feb 21, 2014 at 05:20:06PM -0500, Tom Lane wrote: >> ... 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. > I had a dark corner of an app break from the 8.4-vintage change to make > E'abc\000def'::text raise an error rather than truncate the string. The old > behavior was clearly wrong, but I was still glad the change arrived in a major > release; the truncation happened to be harmless for that app. Adding > pg_verify_mbstr() calls creates a similar situation. Since I'm not hearing anybody else argue for a back-patch, I've committed this in HEAD only. 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