Re: bytea and character encoding when inserting escaped literals

From: Lee Feigenbaum <lee(at)thefigtrees(dot)net>
To: Asche <asche(dot)public(at)mac(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bytea and character encoding when inserting escaped literals
Date: 2008-05-05 15:30:29
Message-ID: 481F2815.2050302@thefigtrees.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Asche wrote:
> Hi Lee,
>
> On 05.05.2008, at 17:07, Lee Feigenbaum wrote:
>> INSERT INTO myTable VALUES (..., E'\x15\x1C\x2F\x00\x02...', ...) ;
>
> try escaping the backslashes:
>
> INSERT INTO myTable VALUES (..., E'\\x15\\x1C\\x2F\\x00\\x02...', ...) ;

Hi Jan,

Thanks for the suggestion. I should have mentioned in my original
message that as per your suggestion and the suggestion in the
documentation, I have tried escaping the backslashes. When I do this, I
get the error:

ERROR: invalid input syntax for type bytea

I tried also doing

INSERT INTO myTable VALUES (...,
E'\\x15\\x1C\\x2F\\x00\\x02...'::bytea, ...) ;

but get the same errors.

Lee

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Asche 2008-05-05 15:37:22 Re: bytea and character encoding when inserting escaped literals
Previous Message Daniel Schuchardt 2008-05-05 15:26:40 Re: operator varchar = integer