Re: Problem inserting binary data in bytea column of UTF-8 database - Mailing list pgsql-sql

From David G. Johnston
Subject Re: Problem inserting binary data in bytea column of UTF-8 database
Date
Msg-id CAKFQuwaxRJdPMPENn9pK9nxGKpod_+cnXgqLP0Oa=OuBpPzS1A@mail.gmail.com
Whole thread Raw
In response to Re: Problem inserting binary data in bytea column of UTF-8 database  (Alexey Bashtanov <bashtanov@imap.cc>)
List pgsql-sql
On Thursday, July 5, 2018, Alexey Bashtanov <bashtanov@imap.cc> wrote:
Hi Brice,

On 03/07/18 05:28, Brice André wrote:
insert into test (test) values (E'\xC744'::bytea);

I think double backslash needs to be used.
See https://www.postgresql.org/docs/current/static/datatype-binary.html#id-1.5.7.12.9

Or lose the "E" marker to turn the escape string literal into an ordinary string literal.

David J.

pgsql-sql by date:

Previous
From: Alexey Bashtanov
Date:
Subject: Re: Problem inserting binary data in bytea column of UTF-8 database
Next
From: Brice André
Date:
Subject: Re: Problem inserting binary data in bytea column of UTF-8 database