From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | James Cloos <cloos(at)jhcloos(dot)com> |
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 01:23:50 |
Message-ID: | 14685.1393291430@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
James Cloos <cloos(at)jhcloos(dot)com> writes:
> "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.
Well, I get that same error from both 9.1 and current if I declare the
column as bytea[]. I think there's some other discrepancy we've not
been told about.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2014-02-25 01:26:48 | Re: BYTEA: PostgreSQL 9.1 vs 9.3 |
Previous Message | James Cloos | 2014-02-25 00:31:27 | Re: BYTEA: PostgreSQL 9.1 vs 9.3 |