odd convert_from bug

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: odd convert_from bug
Date: 2008-01-09 23:22:26
Message-ID: 47855732.90206@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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=#

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Warren Turkal 2008-01-09 23:27:26 Re: operator suggest " interval / interval = numeric"
Previous Message Gavin Sherry 2008-01-09 22:52:09 Re: Named vs Unnamed Partitions