aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-03-04 23:59:14 +0000
committerBruce Momjian <bruce@momjian.us>2002-03-04 23:59:14 +0000
commit294f0d4bd66af9b74beba1efaeb318045a5a060b (patch)
tree3f648d0c5519ca96391fc28dd0f31b1f03ef428d /doc/src
parentb2aade0e4b43d3bddd1dfaa1a3fe0413e404afc7 (diff)
downloadpostgresql-294f0d4bd66af9b74beba1efaeb318045a5a060b.tar.gz
postgresql-294f0d4bd66af9b74beba1efaeb318045a5a060b.zip
Add PQunescapeBytea libpq function.
Everyone using libpq and bytea is probably having to invent this wheel.. Patrick Welche
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>