The case below has just been reported to me. It sure looks odd. I'm
looking into it but any ideas would be welcome. The problem only occurs
if we are updating more than one row.
cheers
andrew
andrew=# select getdatabaseencoding();getdatabaseencoding
---------------------UTF8
(1 row)
andrew=# create table qqq(x text);
CREATE TABLE
andrew=# insert into qqq values('a');
INSERT 0 1
andrew=# update qqq set x =
convert_from(decode('50696f74726bf3772c20506f6c616e64','hex'),'latin9');
UPDATE 1
andrew=# insert into qqq values('a');
INSERT 0 1
andrew=# update qqq set x =
convert_from(decode('50696f74726bf3772c20506f6c616e64','hex'),'latin9')
where x = 'a';
UPDATE 1
andrew=# insert into qqq values('a');
INSERT 0 1
andrew=# insert into qqq values('b');
INSERT 0 1
andrew=# update qqq set x =
convert_from(decode('50696f74726bf3772c20506f6c616e64','hex'),'latin9')
where x = 'a';
UPDATE 1
andrew=# insert into qqq values('c');
INSERT 0 1
andrew=# update qqq set x =
convert_from(decode('50696f74726bf3772c20506f6c616e64','hex'),'latin9') ;
ERROR: encoding name too long
andrew=#