Re: Bug in UTF8-Validation Code? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Bug in UTF8-Validation Code?
Date
Msg-id 45FC15EB.8030508@dunslane.net
Whole thread Raw
In response to Re: Bug in UTF8-Validation Code?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in UTF8-Validation Code?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Last year Jeff suggested adding something like:
>>     pg_verifymbstr(string,strlen(string),0);
>> to each relevant input routine. Would that be an acceptable solution?
>>     
>
> The problem with that is that it duplicates effort: in many cases
> (especially COPY IN) the data's already been validated.  I'm not sure
> how to fix that, but I think you'll get some push-back if you double
> the encoding verification work in COPY for nothing.
>
> Given that we are moving away from backslash-enabled literals, I'm
> not as convinced as some that this must be fixed...
>
>
>
>   

They will still be available in E'\nn' form, won't they?

One thought I had was that it might make sense to have a flag that would 
inhibit the check, that could be set (and reset) by routines that check 
for themselves, such as COPY IN. Then bulk load performance should not 
be hit much.

cheers

andrew


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Bison 2.1 on win32
Next
From: Magnus Hagander
Date:
Subject: Re: Bison 2.1 on win32