Re: array of bytea;

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: array of bytea;
Date: 2017-03-17 14:08:16
Message-ID: 29623.1489759696@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom DalPozzo <t(dot)dalpozzo(at)gmail(dot)com> writes:
> I tried without success INSERT INTO MYTABLE VALUES ('{'\x0011','\x2233'}');
> What's wrong?

You've ignored the rules about how to write element values within an
array literal:
https://www.postgresql.org/docs/current/static/arrays.html#ARRAYS-IO

Personally I tend to write an ARRAY[] construct in preference to
manually adding extra quotes and backslashes to such values.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-03-17 14:14:45 Re: psql - looking in wrong place for socket
Previous Message Tom DalPozzo 2017-03-17 14:04:30 array of bytea;