<HTML ><HEAD ><TITLE >pg_unescape_bytea</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="Funciones de PostgreSQL" HREF="ref.pgsql.html"><LINK REL="PREVIOUS" TITLE="pg_tty" HREF="function.pg-tty.html"><LINK REL="NEXT" TITLE="pg_untrace" HREF="function.pg-untrace.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.pg-tty.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.pg-untrace.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.pg-unescape-bytea" ></A >pg_unescape_bytea</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN64911" ></A ><P > (PHP 4 >= 4.3.0)</P >pg_unescape_bytea -- Escape binary for bytea type </DIV ><DIV CLASS="refsect1" ><A NAME="AEN64914" ></A ><H2 >Description</H2 >string <B CLASS="methodname" >pg_unescape_bytea</B > ( string data)<BR ></BR ><P > <B CLASS="function" >pg_unescape_bytea()</B > unescapes string from bytea datatype. It returns unescaped string (binary). </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > When you SELECT bytea type, PostgreSQL returns octal byte value prefixed by \ (e.g. \032). Users are supposed to convert back to binary format by yourself. </P ><P > This function requires PostgreSQL 7.2 or later. With PostgreSQL 7.2.0 and 7.2.1, bytea type must be casted when you enable multi-byte support. i.e. <TT CLASS="literal" >INSERT INTO test_table (image) VALUES ('$image_escaped'::bytea);</TT > PostgreSQL 7.2.2 or later does not need cast. Exception is when client and backend character encoding does not match, there may be multi-byte stream error. User must cast to bytea to avoid this error. </P ></BLOCKQUOTE ></DIV ><P > See also <A HREF="function.pg-escape-bytea.html" ><B CLASS="function" >pg_escape_bytea()</B ></A > and <A HREF="function.pg-escape-string.html" ><B CLASS="function" >pg_escape_string()</B ></A > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.pg-tty.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.pg-untrace.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >pg_tty</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.pgsql.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >pg_untrace</TD ></TR ></TABLE ></DIV ></BODY ></HTML >