X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8EE865370E for ; Wed, 4 May 2005 11:30:33 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 65895-06 for ; Wed, 4 May 2005 14:30:30 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3166753223 for ; Wed, 4 May 2005 11:30:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j44EURgf018249; Wed, 4 May 2005 10:30:27 -0400 (EDT) To: "Frost, Mr. Michael (contractor)" Cc: pgsql-interfaces@postgresql.org Subject: Re: PQescapeBytea & PQunescapeBytea In-reply-to: <5188F15076BC7A4DBB705747602058C11AAB88@mailhost> References: <5188F15076BC7A4DBB705747602058C11AAB88@mailhost> Comments: In-reply-to "Frost, Mr. Michael (contractor)" message dated "Tue, 03 May 2005 13:51:53 -0700" Date: Wed, 04 May 2005 10:30:27 -0400 Message-ID: <18248.1115217027@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/11 X-Sequence-Number: 5514 "Frost, Mr. Michael (contractor)" 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