Re: BYTEA: PostgreSQL 9.1 vs 9.3

From: James Cloos <cloos(at)jhcloos(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Carel Combrink <carel(dot)combrink(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: BYTEA: PostgreSQL 9.1 vs 9.3
Date: 2014-02-25 00:31:27
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

>>>>> "TL" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

TL> Carel Combrink <carel(dot)combrink(at)gmail(dot)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?

James Cloos <cloos(at)jhcloos(dot)com> OpenPGP: 1024D/ED7DAEA6

In response to


Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2014-02-25 01:23:50 Re: BYTEA: PostgreSQL 9.1 vs 9.3
Previous Message Tom Lane 2014-02-24 18:58:26 Re: getting ERROR: stack depth limit exceeded on a WHERE IN query on a view