Carel Combrink <carel.combrink@gmail.com> writes:
> I am using a PostgreSQL 9.1 server and the following query is perfectly
> valid for a BYTEA type column:
> INSERT INTO files VALUES(18,'\x536f6d6520746573742062797465206172726179');
> But for a server running version 9.3 the above query fails with the
> following error:
> ERROR: array value must start with "{" or dimension information
> LINE 1: insert into files values(18,'\x504b030414000600080000002100e...
Works for me:
$ psql
psql (9.3.2)
Type "help" for help.
regression=# create table files (f1 int, f2 bytea);
CREATE TABLE
regression=# INSERT INTO files VALUES(18,'\x536f6d6520746573742062797465206172726179');
INSERT 0 1
regression=# select * from files;
f1 | f2
----+--------------------------------------------
18 | \x536f6d6520746573742062797465206172726179
(1 row)
Evidently there's some relevant detail you're not telling us.
regards, tom lane