Anders Hammarquist ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
Interactions between bytea and character encoding when doing analyze

Long Description
If a byte string that is not valid unicode is inserted into a bytea
column, analyze will fail unless the data was tagged as bytea in the
insert. However, there appears to be no difference in the data returned
by a select. Both variants of the insert should probably work, but if
not the untagged one should fail at the time of insertion.

Sample Code
ifctest_iko=# create table foo (key int, value bytea);
CREATE
ifctest_iko=# INSERT INTO foo values ( 42, '\\314\\134'::bytea );
INSERT 374905 1
ifctest_iko=# analyze foo;
ANALYZE
ifctest_iko=# INSERT INTO foo values ( 42, '\\314\\134' );
INSERT 374906 1
ifctest_iko=# analyze foo;
ERROR:  Invalid UNICODE character sequence found (0xcc5c)
ifctest_iko=# select * from foo;
 key | value 
-----+-------
  42 | \\
  42 | \\
(2 rows)

ifctest_iko=# set client_encoding to sqlascii;
SET VARIABLE
ifctest_iko=# select * from foo;
 key | value  
-----+--------
  42 | (cc)\\
  42 | (cc)\\
(2 rows)



No file was uploaded with this report


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to