Re: BYTEA: PostgreSQL 9.1 vs 9.3 - Mailing list pgsql-novice

From James Cloos
Subject Re: BYTEA: PostgreSQL 9.1 vs 9.3
Date
Msg-id m338j8118n.fsf@carbon.jhcloos.org
Whole thread Raw
In response to Re: BYTEA: PostgreSQL 9.1 vs 9.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BYTEA: PostgreSQL 9.1 vs 9.3
Re: BYTEA: PostgreSQL 9.1 vs 9.3
List pgsql-novice
>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:

TL> 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...

TL> Works for me:

Here, too when the column is a bytea.  But in the quoted web thread, it
says that he writes that the column is not a bytea, but rather a bytea[].

So the question it seems he really wants to know is whether inserting a
non array value to an array column changed from inserting the value to
the first entry in the array to generating a syntax error.

Of course, why that column is an array I cannot guess.  Perhaps it
wasn't on his older server?

-JimC
--
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: getting ERROR: stack depth limit exceeded on a WHERE IN query on a view
Next
From: Tom Lane
Date:
Subject: Re: BYTEA: PostgreSQL 9.1 vs 9.3