Re: BYTEA: PostgreSQL 9.1 vs 9.3
| От | Tom Lane |
|---|---|
| Тема | Re: BYTEA: PostgreSQL 9.1 vs 9.3 |
| Дата | |
| Msg-id | 31756.1391095684@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BYTEA: PostgreSQL 9.1 vs 9.3 (Carel Combrink <carel.combrink@gmail.com>) |
| Ответы |
Re: BYTEA: PostgreSQL 9.1 vs 9.3
|
| Список | pgsql-novice |
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
В списке pgsql-novice по дате отправления: