aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/libpq.sgml21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index d487cce5cc3..34ab2bb59f8 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.87 2002/01/18 20:39:04 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.88 2002/03/04 23:59:11 momjian Exp $
-->
<chapter id="libpq">
@@ -955,6 +955,25 @@ strings overlap.
byte is also added. The single quotes that must surround
PostgreSQL string literals are not part of the result string.
</para>
+
+ <para>
+ <function>PQunescapeBytea</function>
+ Converts an escaped string representation of binary data into binary
+ data - the reverse of <function>PQescapeBytea</function>.
+ <synopsis>
+ unsigned char *PQunescapeBytea(unsigned char *from, size_t *to_length);
+ </synopsis>
+
+ The <paramater>from</parameter> parameter points to an escaped string
+ such as might be returned by <function>PQgetvalue</function> of a
+ <type>BYTEA</type> column. <function>PQunescapeBytea</function> converts
+ this NUL terminated string representation into binary, filling a buffer.
+ It returns a pointer to the buffer which is NULL on error, and the size
+ of the buffer in <parameter>to_length</parameter>. The pointer may
+ subsequently be used as an argument to the function
+ <function>free(3)</function>.
+ </para>
+
</sect2>