uTools-Manuals/docs/php/pg_unescape_bytea.html
2019-04-08 23:22:26 +08:00

48 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>取消 bytea 类型中的字符串转义</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.pg-unescape-bytea" class="refentry">
<div class="refnamediv">
<h1 class="refname">pg_unescape_bytea</h1>
<p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">pg_unescape_bytea</span> &mdash; <span class="dc-title">
取消 bytea 类型中的字符串转义
</span></p>
</div>
<div class="refsect1 unknown-unknown-exampleu" id="refsect1-function.pg-unescape-bytea-unknown-unknown-exampleu">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>pg_unescape_bytea</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
) : <span class="type">string</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>pg_unescape_bytea()</strong></span>
bytea 数据类型中的字符串取消转义。返回未转义的字符串(二进制)。
</p>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
当 SELECT bytea 类型PostgreSQL
返回用 \ 前导的八进制字节值(例如 \032。用户需要自行将其转换回二进制格式。
</p>
<p class="para">
本函数需要
PostgreSQL 7.2 或更新版本。在
PostgreSQL 7.2.0 和 7.2.1
中,当激活了多字节支持时必须强制转换为 bytea 类型,例如
<em>INSERT INTO test_table (image)
VALUES (&#039;$image_escaped&#039;::bytea);</em>。PostgreSQL 7.2.2
或更新版本不需要强制转换。例外是当客户端和后端的字符编码不匹配时,有可能出现多字节流错误。用户必须强制转换为 bytea 来避免此错误。
</p>
</p></blockquote>
<p class="para">
参见 <span class="function"><a href="pg_escape_bytea.html" class="function">pg_escape_bytea()</a></span>
<span class="function"><a href="pg_escape_string.html" class="function">pg_escape_string()</a></span>
</p>
</div>
</div></div></div></body></html>