pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Klaus Darilion <klaus.mailinglists@pernau.at>
To: pgsql-interfaces@postgresql.org
Subject: libpq string escaping question
Date: Fri, 25 Jan 2008 11:13:18 +0100
Message-ID: <4799B63E.90006@pernau.at> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <4799B63E.90006@pernau.at>
Permalink:  ../4799B63E.90006@pernau.at/
Also on:    postgresql.org/message-id/4799B63E.90006@pernau.at

 · 

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: klaus.mailinglists@pernau.at
  Subject: Re: libpq string escaping question
  In-Reply-To: <4799B63E.90006@pernau.at>

* 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