bytea question

From: Maximilian Tyrtania <maximilian(dot)tyrtania(at)byte-employer(dot)de>
To: 'PostgreSQL pg-general List' <pgsql-general(at)postgresql(dot)org>
Subject: bytea question
Date: 2009-09-28 15:07:05
Message-ID: C6E69DB9.3B814%maximilian.tyrtania@byte-employer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PG 8.4.0 running on Mac OS 10.6.1

Could anyone tell me why the bytea datatypes seems to like some bytes better
than others?

testdb=# create table byteatest(blob bytea);
CREATE TABLE
testdb=# insert into byteatest (blob) values (E'\\007');
INSERT 0 1
testdb=# insert into byteatest (blob) values (E'\\008');
ERROR: invalid input syntax for type bytea
LINE 1: insert into byteatest (blob) values (E'\\008');

Or also:

testdb=# SELECT E'\\001'::bytea;
bytea
-------
\001
(1 row)

testdb=# SELECT E'\\008'::bytea;
ERROR: invalid input syntax for type bytea
LINE 1: SELECT E'\\008'::bytea;

As far as I can see i followed the escaping rules given in

http://www.postgresql.org/docs/current/static/datatype-binary.html

Thanks,

Maximilian Tyrtania

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Konoplev 2009-09-28 15:17:31 Re: Wrong rows count estimation (explain, gist, tsearch)
Previous Message Reid Thompson 2009-09-28 15:05:06 computed values in plpgsql