1
0
mirror of https://github.com/php/doc-zh.git synced 2026-04-24 00:28:08 +02:00
Files
archived-doc-zh/reference/pgsql/functions/pg-trace.xml
T
Dallas Wang 9a2f55cb0a Correct Line-endings.
git-svn-id: https://svn.php.net/repository/phpdoc/zh/trunk@97440 c90b9560-bf6c-de11-be94-00142212c4b1
2002-09-30 03:25:33 +00:00

53 lines
2.0 KiB
XML
Executable File

<?xml version="1.0" encoding="gb2312"?>
<!-- $Revision: 1.2 $ -->
<!-- $Author: dallas $ -->
<!-- EN-Revision: 1.3 Maintainer: dallas Status: ready -->
<refentry id="function.pg-trace">
<refnamediv>
<refname>pg_trace</refname>
<refpurpose>启动一个 PostgreSQL 连接的追踪功能</refpurpose>
</refnamediv>
<refsect1>
<title>说明</title>
<methodsynopsis>
<type>bool</type><methodname>pg_trace</methodname>
<methodparam><type>string</type><parameter>pathname</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>mode</parameter></methodparam>
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
<function>pg_trace</function> 启动 PostgreSQL 前端/后端通讯的追踪并记录到 <parameter>pathname</parameter> 指定的文件中。要完全理解结果,用户需要熟悉 PostgreSQL 通讯协议的本质。对不熟悉的用户来说,追踪发送到服务器的查询错误依然有用,例如可以用 <command>grep '^To backend' trace.log</command> 来查看哪些查询实际上被发送到了 PostgreSQL 服务器。更多信息参考 PostgreSQL 手册。
</para>
<para>
参数 <parameter>pathname</parameter><parameter>mode</parameter><function>fopen</function>(<parameter>mode</parameter> 默认为 'w') 中的一样。<parameter>connection</parameter> 指定了要追踪的连接,默认为上一个打开的连接。
</para>
<para>
如果 <parameter>pathname</parameter> 可以作为日志文件打开,则返回 &true;,否则返回 &false;
</para>
<para>
参见 <function>fopen</function><function>pg_untrace</function>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->