Re: Problem inserting binary data in bytea column of UTF-8 database

"David G. Johnston" <[email protected]>
Newsgroups gmane.comp.db.postgresql.sql
Message-ID <CAKFQuwaxRJdPMPENn9pK9nxGKpod_+cnXgqLP0Oa=OuBpPzS1A@mail.gmail.com>
On Thursday, July 5, 2018, Alexey Bashtanov <[email protected]> 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-bina
> ry.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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.