odd convert_from bug - Mailing list pgsql-hackers

From Andrew Dunstan
Subject odd convert_from bug
Date
Msg-id 47855732.90206@dunslane.net
Whole thread Raw
Responses Re: odd convert_from bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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=#


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Named vs Unnamed Partitions
Next
From: "Warren Turkal"
Date:
Subject: Re: operator suggest " interval / interval = numeric"