2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 08:37:21 +00:00
|
|
|
<!-- $Revision$ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.pg-lo-read-all" xmlns="http://docbook.org/ns/docbook">
|
2005-03-08 00:06:33 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>pg_lo_read_all</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Reads an entire large object and send straight to browser
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
2005-03-11 16:03:26 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2005-03-08 00:06:33 +00:00
|
|
|
<methodsynopsis>
|
2020-11-28 18:05:44 +00:00
|
|
|
<type>int</type><methodname>pg_lo_read_all</methodname>
|
2005-03-08 00:06:33 +00:00
|
|
|
<methodparam><type>resource</type><parameter>large_object</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>pg_lo_read_all</function> reads a large object and passes
|
|
|
|
it straight through to the browser after sending all pending
|
|
|
|
headers. Mainly intended for sending binary data like images or
|
2005-04-14 03:21:36 +00:00
|
|
|
sound.
|
2005-03-08 00:06:33 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2005-04-14 03:21:36 +00:00
|
|
|
To use the large object interface, it is necessary to
|
2005-03-08 00:06:33 +00:00
|
|
|
enclose it within a transaction block.
|
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<para>
|
2005-04-21 09:29:36 +00:00
|
|
|
This function used to be called <function>pg_loreadall</function>.
|
2005-03-08 00:06:33 +00:00
|
|
|
</para>
|
|
|
|
</note>
|
2005-03-11 16:03:26 +00:00
|
|
|
</refsect1>
|
|
|
|
|
2005-04-14 03:21:36 +00:00
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>large_object</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
PostgreSQL large object (LOB) resource, returned by <function>pg_lo_open</function>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Number of bytes read or &false; on error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>pg_lo_read_all</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
header('Content-type: image/jpeg');
|
|
|
|
$image_oid = 189762345;
|
|
|
|
$database = pg_connect("dbname=jacarta");
|
|
|
|
pg_query($database, "begin");
|
|
|
|
$handle = pg_lo_open($database, $image_oid, "r");
|
|
|
|
pg_lo_read_all($handle);
|
|
|
|
pg_query($database, "commit");
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2005-03-11 16:03:26 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2005-03-08 00:06:33 +00:00
|
|
|
<para>
|
2005-03-11 16:03:26 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>pg_lo_read</function></member>
|
|
|
|
</simplelist>
|
2005-03-08 00:06:33 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
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
|
|
|
|
-->
|