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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Libpq: PQunescapeBytea



	CN wrote:

> Question: Does it mean that there exist some functions being able to
> retrieve bytea columns in "binary format"? My understanding of its
> meaning is that these functions will automatically restore the data read
> from database to their original unescaped binary strings and thus
> PQescapeBytea needs not to be called. If it does, what are these
> functions? PQgetvalue appears to be not one of them I think.

There's no specific function but when you pass 1 to the
'resultFormat' parameter of PQexecParams(), its results are
returned in binary format.
Then PQgetvalue() will give you the address of the data and
PQgetlength() its size. When this data is of type bytea, no
conversion is required.

-- 
 Daniel
 PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group