Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group