Andrew Dunstan <and...@dunslane.net> writes: > On Thu, Nov 24, 2011 at 4:54 AM, Florian Weimer <fwei...@bfk.de> wrote: >> 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.
> Refuse away, but I don't think you know what you're asking for. Given the > number of places that treat text values as being nul-terminated in the > code, we'd be many years fixing bugs from a change like this, IMNSHO. Yeah. This has been discussed before (see the archives) and every time we've concluded that the amount of pain and developer effort would outweigh the benefit by many orders of magnitude. Just to start with, we'd have to change the convention that datatype I/O functions take and return cstring, thus breaking every core and add-on datatype. If you really need to store nulls, use bytea. If there are specific operations you need that aren't available on bytea, we'd probably entertain proposals to add them. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers