pgcrypto/encrypt insertion failes due to \\ (2 slah being next to each other)

Lists: pgsql-general
From: "Ismail Seyfi" <ismail(dot)seyfi(at)vivakos(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pgcrypto/encrypt insertion failes due to \\ (2 slah being next to each other)
Date: 2004-08-11 22:41:12
Message-ID: 20040811224034.D72D614B281C@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi,

I am currently using pgcrypto functions (encrypt(), decrypt()) on postgresql
7.4.1. There seems to be a problem when ever I try to insert a string that
contains "\\" (2 slashes next to each other"). it gives an error message
saying that it is not a valid entry for type bytea. I am using rijndael as
the algrothim.

Can any one tell me why this would be happening? Thanks for your time

Thanks

Ismail


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ismail Seyfi <ismail(dot)seyfi(at)vivakos(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgcrypto/encrypt insertion failes due to \\ (2 slah being
Date: 2004-08-15 20:54:12
Message-ID: 200408152054.i7FKsC316915@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Ismail Seyfi wrote:
> Hi,
>
>
>
> I am currently using pgcrypto functions (encrypt(), decrypt()) on postgresql
> 7.4.1. There seems to be a problem when ever I try to insert a string that
> contains "\\" (2 slashes next to each other"). it gives an error message
> saying that it is not a valid entry for type bytea. I am using rijndael as
> the algrothim.
>
>
>
> Can any one tell me why this would be happening? Thanks for your time

I think with bytea you have to use extra slashes, perhaps "\\\\" for
every literal slash.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073