Re: [GENERAL] array of bytea; - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] array of bytea;
Date
Msg-id 29623.1489759696@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] array of bytea;  (Tom DalPozzo <t.dalpozzo@gmail.com>)
List pgsql-general
Tom DalPozzo <t.dalpozzo@gmail.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


pgsql-general by date:

Previous
From: Tom DalPozzo
Date:
Subject: [GENERAL] array of bytea;
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] psql - looking in wrong place for socket