1
0
mirror of https://github.com/php/doc-ru.git synced 2026-04-25 16:28:19 +02:00
Files
archived-doc-ru/reference/pgsql/functions/pg-lo-tell.xml
T
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

127 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: c2eca73ef79ebe78cebb34053e41b565af504c4f Maintainer: mch Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.pg-lo-tell" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>pg_lo_tell</refname>
<refpurpose>
Возвращает текущее положение внутреннего указателя большого объекта
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>pg_lo_tell</methodname>
<methodparam><type>PgSql\Lob</type><parameter>lob</parameter></methodparam>
</methodsynopsis>
<para>
<function>pg_lo_tell</function> возвращает текущую позицию (отступ
от начала) внутреннего указателя большого объекта.
</para>
<para>
Операции с использованием интерфейса больших объектов
необходимо заключать в блок транзакции.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>lob</parameter></term>
<listitem>
&pgsql.parameter.lob;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Текущая позиция внутреннего указателя (количество байт от начала) большого объекта.
В случае возникновения ошибки функция вернёт отрицательное значение.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&pgsql.changelog.lob-object;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <function>pg_lo_tell</function></title>
<programlisting role="php">
<![CDATA[
<?php
$doc_oid = 189762345;
$database = pg_connect("dbname=jacarta");
pg_query($database, "begin");
$handle = pg_lo_open($database, $doc_oid, "r");
// Пропустить первые 50000 байт
pg_lo_seek($handle, 50000, PGSQL_SEEK_SET);
// Проверим, на сколько мы отступили
$offset = pg_lo_tell($handle);
echo "Текущее положение внутреннего указателя: $offset";
pg_query($database, "commit");
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
Текущее положение внутреннего указателя: 50000
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>pg_lo_seek</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->