Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions reference/pcre/functions/preg-replace.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: d6f54016d62904cfd8200604aadd5e3f0d9bad97 Maintainer: daijie Status: ready -->
<!-- EN-Revision: 79c53e3fa2afc0f09373b17c23896465d8d41d0a Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.preg-replace" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand Down Expand Up @@ -69,13 +69,6 @@
<literal>\\11</literal> 后向引用后面不跟任何东西。 这种情况下解决方案是使用 <literal>${1}1</literal>。这创建了一个独立的
<literal>$1</literal> 后向引用, 一个独立的原文 <literal>1</literal>。
</para>
<para>
当使用被弃用的 <literal>e</literal> 修饰符时, 这个函数会转义一些字符 (即:<literal>'</literal>、<literal>"</literal>、
<literal>\</literal> 和 NULL) 然后进行后向引用替换。当这些完成后请确保后向引用解析完后没有单引号或双引号引起的语法错误 (比如:
<literal>'strlen(\'$1\')+strlen("$2")'</literal>)。确保符合 PHP 的
<link linkend="language.types.string">字符串语法</link>,并且符合 eval 语法。因为在完成替换后,引擎会将结果字符串作为 PHP 代码使用
eval 方式进行评估并将返回值作为最终参与替换的字符串。
</para>
</listitem>
</varlistentry>
<varlistentry>
Expand Down
4 changes: 2 additions & 2 deletions reference/pgsql/constants.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 3c6c95fcfd7d9eaa603df40327693ea8dff89d53 Maintainer: dallas Status: ready -->
<!-- EN-Revision: f5419b6eddbbb69317b0b3e6d752532ee2ed0b2a Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<appendix xml:id="pgsql.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
Expand Down Expand Up @@ -875,7 +875,7 @@
</term>
<listitem>
<simpara>
跟 <function>pg_trace</function> 一起使用,时间戳不包含在跟踪消息中。自 PHP 8.3.0 起可用。
跟 <function>pg_trace</function> 一起使用,时间戳不包含在跟踪消息中。自 PHP 8.4.20 起可用。
</simpara>
</listitem>
</varlistentry>
Expand Down
6 changes: 3 additions & 3 deletions reference/pgsql/functions/pg-affected-rows.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.pg-affected-rows" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_affected_rows</refname>
Expand All @@ -19,7 +19,7 @@
和 <literal>DELETE</literal> 查询影响的元组数(实例/记录/行)。
</para>
<para>
从 PostgreSQL 9.0 及更高版本开始,服务器返回 SELECT 的行数。较旧的 PostgreSQL 则返回 0
服务器返回 SELECT 的行数。
</para>
<note>
<para>
Expand Down
6 changes: 3 additions & 3 deletions reference/pgsql/functions/pg-client-encoding.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: ad618eea48c773ff8768d9d27ea986f81a2a2400 Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.pg-client-encoding" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_client_encoding</refname>
Expand All @@ -22,7 +22,7 @@
</para>
<note>
<para>
此函数需要 PostgreSQL 7.0 或更高版本。如果 libpq 在没有多字节编码支持的情况下编译,<function>pg_client_encoding</function>
如果 libpq 在没有多字节编码支持的情况下编译,<function>pg_client_encoding</function>
总是返回 <literal>SQL_ASCII</literal>。支持的编码取决于 PostgreSQL 版本。请参阅 PostgreSQL 文档支持的编码。
</para>
<para>
Expand Down
9 changes: 2 additions & 7 deletions reference/pgsql/functions/pg-escape-string.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id='function.pg-escape-string' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_escape_string</refname>
Expand All @@ -22,11 +22,6 @@
是为 PostgreSQL 转义 SQL 参数的首选方法。<function>addslashes</function> 不得与 PostgreSQL 一起使用。如果列的类型是 bytea,则必须改用
<function>pg_escape_bytea</function>。<function>pg_escape_identifier</function> 必须用于转义标识符(例如表名、字段名)
</para>
<note>
<para>
本函数需要 PostgreSQL 7.2 及其更高版本。
</para>
</note>
</refsect1>

<refsect1 role="parameters">
Expand Down
10 changes: 5 additions & 5 deletions reference/pgsql/functions/pg-lo-create.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
<refentry xml:id="function.pg-lo-create" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -22,8 +22,8 @@
</methodsynopsis>
<para>
<function>pg_lo_create</function> 新建大对象并返回大对象的 <varname>oid</varname>。不支持 PostgreSQL
访问模式 <constant>INV_READ</constant><constant>INV_WRITE</constant>
<constant>INV_ARCHIVE</constant>,创建的对象始终以读写方式访问。<constant>INV_ARCHIVE</constant> 已经从 PostgreSQL(6.3 及以上版本)中移除
访问模式 <constant>INV_READ</constant><constant>INV_WRITE</constant>
创建的对象始终以读写方式访问。
</para>
<para>
要使用大对象接口,必须将其封装在一个事务块中。
Expand Down Expand Up @@ -53,7 +53,7 @@
<listitem>
<para>
如果指定 <parameter>object_id</parameter>,该函数将尝试使用此 id 创建大对象,否则服务器将分配一个空闲对象
id。该参数依赖于 PostgreSQL 8.1 中首次出现的功能。
id。
</para>
</listitem>
</varlistentry>
Expand Down
9 changes: 2 additions & 7 deletions reference/pgsql/functions/pg-unescape-bytea.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 58645a79f1993effc0571f7b49acc9aace0e417f Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: dallas Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.61 -->
<refentry xml:id="function.pg-unescape-bytea" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
Expand All @@ -25,11 +25,6 @@
当 <literal>SELECT</literal> bytea 类型时,PostgreSQL
返回前缀为“\”的八进制字节值(例如 \032)。用户需要手动将其转换回二进制格式。
</para>
<para>
本函数需要 PostgreSQL 7.2 及其以后的版本。在 PostgreSQL 7.2.0 和 7.2.1 中,当启用了多字节支持时 bytea 值必需进行类型转换,例如
<literal>INSERT INTO test_table (image) VALUES ('$image_escaped'::bytea);</literal> ;PostgreSQL 7.2.2
及其以后的版本不需要类型转换。唯一的例外是当客户端和后端的字符编码不匹配时,有可能出现多字节流错误。用户必须将其转换为 bytea 来避免此错误。
</para>
</note>
</refsect1>

Expand Down
9 changes: 6 additions & 3 deletions reference/pgsql/setup.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 5f1a92089fa4efe81e9777f87f9ed93f4853898b Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<chapter xml:id="pgsql.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;

<!-- {{{ Requirements -->
<section xml:id="pgsql.requirements">
&reftitle.required;
<para>
要使用 PostgreSQL 支持,需要 PostgreSQL 6.5 或更高版本,PostgreSQL 8.0 或更高版本才能启用所有 PostgreSQL
模块功能。PostgreSQL 支持包含多字节字符编码的多种字符编码。有关 PostgreSQL 的当前版本和更多信息,请访问
要使用 PostgreSQL 支持,你需要 libpq(PostgreSQL C 客户端库)。
从 PHP 8.0.0 开始,需要 libpq 9.1 或更高版本。
从 PHP 8.4.0 开始,需要 libpq 10.0 或更高版本。
PostgreSQL 支持包含多字节字符编码的多种字符编码。有关 PostgreSQL 的当前版本和更多信息,请访问
<link xlink:href="&url.pgsql;">&url.pgsql;</link> 和 <link xlink:href="&url.pgsql.manual;">PostgreSQL 文档</link>。
</para>
</section>
Expand Down