insert a backslash into a bytea field?

From: Kevin Kempter <kevink(at)consistentstate(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: insert a backslash into a bytea field?
Date: 2009-08-11 20:13:03
Message-ID: 200908111413.03754.kevink@consistentstate.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all;

we want to insert a single backslash into a bytea column (running postgres v
8.3.5)

this works to insert 2 backslashes (but we only want one):
insert into test_bytea_tab (id, bytea_test_col)
values(999999, '\\\\testdata'::bytea)

However none of these work:

insert into test_bytea_tab (id, bytea_test_col)
values(999999, '\\testdata'::bytea)

insert into test_bytea_tab (id, bytea_test_col)
values(999999, E'\\testdata'::bytea)

FWIW backslash_quote is set to 'safe_encoding'

Thoughts?

Thanks in advance

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anj Adu 2009-08-11 21:48:34 XID wraparound in 8.4
Previous Message mattcwood 2009-08-11 18:48:29 Re: PITR archive_timeout Command