Re: Bad Data back Door

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bad Data back Door
Date: 2012-10-06 10:45:23
Message-ID: 50700BC3.90004@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.10.2012 05:14, John R Pierce wrote:
> I'd like to see some encoding validation and substitution functions in
> postgres. for instance, one that can take any supported encoding and
> convert it to the database encoding and generate an error on any invalid
> character. this translation could be identity (eg, UTF8->UTF8) whereupon
> it would just validate.

See pg_any_to_server() in mbutils.c. At the SQL level, there's the
convert(bytea, name, name) function.

> a 2nd function would do the same, but replace
> errors with the substitution character in the target charset and not error.

Hmm, I don't think we have that.

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-10-06 11:29:29 Re: Add FET to Default and Europe.txt
Previous Message Marc Balmer 2012-10-06 09:18:43 Add FET to Default and Europe.txt