Re: PQescapeBytea & PQunescapeBytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Frost, Mr(dot) Michael (contractor)" <frost(at)nrlmry(dot)navy(dot)mil>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQescapeBytea & PQunescapeBytea
Date: 2005-05-04 14:30:27
Message-ID: 18248.1115217027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Frost, Mr. Michael (contractor)" <frost(at)nrlmry(dot)navy(dot)mil> writes:
> [ PQescapeBytea & PQunescapeBytea are not inverses ]

They're not supposed to be. PQescapeBytea creates something that can be
inserted into a SQL command as a string literal. PQunescapeBytea
deconstructs something that has been returned as a SELECT result.
There are two different levels of backslashing involved.

This doesn't directly answer your original problem, but I think we'll
need to see more of your code to figure out what you were doing wrong.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Scott Marlowe 2005-05-04 15:38:52 Re: [GENERAL] Postgre 8.0 for Linux i586
Previous Message Bruno Wolff III 2005-05-04 14:16:32 Re: [INTERFACES] calculated identity field in views, again...