Skip site navigation (1) Skip section navigation (2)

Re: Making TEXT NUL-transparent

From: Florian Weimer <fweimer(at)bfk(dot)de>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Alexander Shulgin <ash(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making TEXT NUL-transparent
Date: 2011-11-24 10:59:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
* Pavel Stehule:

>> By the way, I refuse the notion that UTF-8 strings with embedded NULs
>> are "broken".  I can't recall any other system which enforces UTF-8
>> well-formedness, but does not permit embedded NULs.

> I have a different question. What is reason for embedded NULs inside
> strings?

The source system does not enforce that constraint, so from time to
time, such data slips through.  I don't know why it's there in the first
place, and I have no control over the original data source.  Usually,
it's okay to silently strip NUL bytes; it's just a bit awkward.

Florian Weimer                <fweimer(at)bfk(dot)de>
BFK edv-consulting GmbH
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

In response to


pgsql-hackers by date

Next:From: Lars KanisDate: 2011-11-24 11:29:30
Subject: Re: [PATCH] PostgreSQL fails to build with 32bit MinGW-w64
Previous:From: Pavel StehuleDate: 2011-11-24 10:20:01
Subject: Re: Making TEXT NUL-transparent

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group