Re: BUG #3819: UTF8 can't handle \000 - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #3819: UTF8 can't handle \000
Date
Msg-id 47666776.1000504@enterprisedb.com
Whole thread Raw
In response to Re: BUG #3819: UTF8 can't handle \000  ("Franklin Schmidt" <fschmidt@gmail.com>)
List pgsql-bugs
Franklin Schmidt wrote:
> I agree that storing 0x00 in a UTF8 string is weird, but I am
> converting a huge database to postgres, and in a huge database, weird
> things happen.  Using bytea for a text field just because one in a
> million records has a 0x00 doesn't make sense to me.  I did hack
> around it in my conversion code to remove the 0x00 but I expect that
> anyone else who tries converting a big database to postgres will also
> confront this issue.

That's the right solution. If you have 0x00 bytes in your text fields,
you're much better off cleaning them away anyway, than trying to work
around them.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

pgsql-bugs by date:

Previous
From: "Ronny Hellgren"
Date:
Subject: BUG #3821: Wrong language at "Installation Notes"
Next
From: "chris wood"
Date:
Subject: bug found in 8.3 beta 3.