From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Bug #728: Interactions between bytea and character encoding when doing analyze |
Date: | 2002-08-01 14:12:05 |
Message-ID: | 20020801141205.2A6424759D4@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Anders Hammarquist (iko(at)strakt(dot)com) 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-08-01 14:23:57 | Re: Bug #728: Interactions between bytea and character encoding when doing analyze |
Previous Message | Hubert Pérès | 2002-08-01 06:29:41 | Re: share lib libpq++ |