Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> I found a crash case (assertion failure) when runing psql -f
> utf8_encoded_script.sql against client_encoding = shift_jis in
> postgresql.conf. Though encoding mismatch is obviously user's fault, a
> crash doesn't explain anything to him.
I'm not too impressed with this patch: it seems like the most it will
accomplish is to move the failure to some other, equally obscure, place
--- because you'll still have a string that's invalidly encoded.
Moreover, if you've got wrongly encoded data, it wouldn't be hard at all
for it to mess up psql's lexing; consider cases such as a
character-that's-not-as-long-as-we-think just in front of a quote mark.
Shouldn't we instead try to verify the multibyte encoding somewhere
upstream of here?
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: KaiGai Kohei||Date: 2011-01-13 06:10:45|
|Subject: Re: sepgsql contrib module|
|Previous:||From: Tom Lane||Date: 2011-01-13 05:12:47|
|Subject: Re: arrays as pl/perl input arguments [PATCH] |