| From: | Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns |
| Date: | 2008-11-10 16:14:52 |
| Message-ID: | 49185DFC.5050809@megafon.hr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Tom Lane wrote:
>> I'm using the above mentioned string to store data into bytea column. I
>> did pg_dump of the database on postgres 8.2, and then tried to restore
>> it on postgres 8.3, and I got this error. The actuall line that produces
>> error is like this:
>
>> INSERT INTO vpn_payins_bitfield (vpn_id, payload_pattern, encription,
>> encription_key, charset, amount_width, shop_width, counter_width) VALUES
>> (3, E'\\W*(\\w+)(?:\\W+(.*))?', 'RC4',
>> E'\xc5\x53\x94\x96\x83\x29'::bytea, 'ABCDEGHIKLMOPTWX', 16, 8, 16);
>
> Exactly what version of pg_dump are you using? What I get from pg_dump
> doesn't look like that. Bytea fields with -D look more like this:
>
> INSERT INTO foo (f1) VALUES ('\\305S\\224\\226\\203)');
Yes, I mistakenly used pg8.2 pg_dump, when I use pg3.8 dump I get what
you get. Btw, what is that S after 305? 305 octal is C5 hexadecimal. How
do I enter hexadecimal C5 without UTF encoding errors?
Mike
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-11-10 16:26:09 | Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns |
| Previous Message | Tom Lane | 2008-11-10 15:48:00 | Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns |