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

libpq string escaping question

From: Klaus Darilion <klaus(dot)mailinglists(at)pernau(dot)at>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: libpq string escaping question
Date: 2008-01-25 10:13:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
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?



pgsql-interfaces by date

Next:From: Daniel VeriteDate: 2008-01-26 13:58:52
Subject: Re: libpq string escaping question
Previous:From: fschmidtDate: 2008-01-24 18:18:05
Subject: Is there an interface that...

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