Bug #625: bytea data type problem/bug

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #625: bytea data type problem/bug
Date: 2002-03-27 20:25:56
Message-ID: 20020327202556.9F29447593C@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Eric Lu (yclu(at)ecompliance(dot)net) reports a bug with a severity of 4
The lower the number the more severe it is.

Short Description
bytea data type problem/bug

Long Description
Hi,

It happens when I was trying to test the avalaibility of the new binary data type <bytea> comes with ver 7.2.
As I read from the document, <bytea> will take data from '\\000' (0d)to '\\377' (255d). Although it saves data more than one byte, it looks odd to me that the first digit of the binary data could never be greater than '3'.
Is it the way it should be?
Thanks!

Eric Lu

Sample Code
testdb=> insert into bytetest(id,bdata) values(8,'\\777');
ERROR: Bad input string for type bytea
testdb=> insert into bytetest(id,bdata) values(8,'\\400');
ERROR: Bad input string for type bytea
testdb=> insert into bytetest(id,bdata) values(8,'\\4000');
ERROR: Bad input string for type bytea
testdb=> insert into bytetest(id,bdata) values(8,'\\7000');
ERROR: Bad input string for type bytea
testdb=> insert into bytetest(id,bdata) values(8,'\\3000');
INSERT 488510 1
testdb=> select * from bytetest;
id|bdata
--+----------
1|\\
2|\000
3|\225321465
3|
5|\011
6|H
7|\377
8|\3000
(8 rows)

WHERE bytetest was created by:
create table bytetest(
id int,
bdata bytea
);

No file was uploaded with this report

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Joe Conway 2002-03-27 21:27:56 Re: Bug #625: bytea data type problem/bug
Previous Message Ron Mayer 2002-03-27 06:50:13 Re: Inconsistant use of index.