Re: Re: [HACKERS] Re: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, digoal(at)126(dot)com
Subject: Re: Re: [HACKERS] Re: BUG #9210: PostgreSQL string store bug? not enforce check with correct characterSET/encoding
Date: 2014-02-23 20:28:18
Message-ID: 18745.1393187298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Noah Misch <noah(at)leadboat(dot)com> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Jeff Davis 2014-02-24 03:40:04 Re: Crash in json_to_record()
Previous Message Tom Lane 2014-02-22 01:17:36 Re: Uninterruptable regexp_replace in 9.3.1 ?

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-02-23 20:29:38 Re: Should PostgresMain() do a LWLockReleaseAll()?
Previous Message Pavel Stehule 2014-02-23 20:16:51 Re: often PREPARE can generate high load (and sometimes minutes long unavailability)