Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5DECE2E0317 for ; Fri, 25 Jan 2008 06:13:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28089-08 for ; Fri, 25 Jan 2008 06:13:22 -0400 (AST) Received: from ds3000.pernau.at (ds3000.pernau.at [88.198.53.113]) by postgresql.org (Postfix) with ESMTP id C09A82E3CC5 for ; Fri, 25 Jan 2008 06:13:22 -0400 (AST) Received: from [10.10.0.51] (nat.labs.nic.at [83.136.33.3]) by ds3000.pernau.at (Postfix) with ESMTP id 59B851080016 for ; Fri, 25 Jan 2008 11:13:19 +0100 (CET) Message-ID: <4799B63E.90006@pernau.at> Date: Fri, 25 Jan 2008 11:13:18 +0100 From: Klaus Darilion User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: libpq string escaping question Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200801/16 X-Sequence-Number: 6694 Hi all! From the docs: > PQunescapeBytea > > Converts a string representation of binary data into binary data — > the reverse of PQescapeBytea. This is needed when retrieving bytea > data in text format, but not when retrieving it in binary format. But how do I know if data is retrieved in text or binary format? I read that PQexecParams allows to specify the return format (text or binary) but what about PQexec() and PQgetResult()? Do they return binary or text? Or is it configurable for PQexec ann PQgetResult too? Further from the docs (about E'' syntax): > The standard_conforming_strings value is read-only. Applications can > retrieve the value to know how backslashes are processed. (Presence > of the parameter can also be taken as an indication that E'' string > syntax is supported.) How can I retrieve this value? thanks klaus