pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Frost, Mr. Michael (contractor) <frost@nrlmry.navy.mil>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: PQescapeBytea & PQunescapeBytea
Date: Wed, 04 May 2005 10:30:27 -0400
Message-ID: <18248.1115217027@sss.pgh.pa.us> (raw)
In-Reply-To: <5188F15076BC7A4DBB705747602058C11AAB88@mailhost>
References: <5188F15076BC7A4DBB705747602058C11AAB88@mailhost>

"Frost, Mr. Michael (contractor)" <frost@nrlmry.navy.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



view thread (4+ messages)  latest in thread

Message-ID: <18248.1115217027@sss.pgh.pa.us>
Permalink:  ../18248.1115217027@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18248.1115217027@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, frost@nrlmry.navy.mil
  Subject: Re: PQescapeBytea & PQunescapeBytea
  In-Reply-To: <18248.1115217027@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox