| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.6.0"> |
| 6 |
<title>pg_lo_read</title> |
| 7 |
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79"> |
| 8 |
<link rev="MADE" href="mailto:[email protected]"> |
| 9 |
<link rel="HOME" title="PostgreSQL Tcl Interface Documentation" href="index.html"> |
| 10 |
<link rel="UP" title="pgtcl Command Reference" href="libpgtcl-ref.html"> |
| 11 |
<link rel="PREVIOUS" title="pg_lo_close" href="pgtcl-pgloclose.html"> |
| 12 |
<link rel="NEXT" title="pg_lo_write" href="pgtcl-pglowrite.html"> |
| 13 |
<link rel="STYLESHEET" type="text/css" href="stylesheet.css"> |
| 14 |
</head> |
| 15 |
<body class="REFENTRY"> |
| 16 |
<div class="NAVHEADER"> |
| 17 |
<table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0"> |
| 18 |
<tr> |
| 19 |
<th colspan="5" align="center" valign="bottom">PostgreSQL Tcl Interface Documentation</th> |
| 20 |
</tr> |
| 21 |
<tr> |
| 22 |
<td width="10%" align="left" valign="top"><a href="pgtcl-pgloclose.html" accesskey="P">Prev</a></td> |
| 23 |
<td width="10%" align="left" valign="top"><a href="pgtcl-pgloclose.html">Fast Backward</a></td> |
| 24 |
<td width="60%" align="center" valign="bottom"></td> |
| 25 |
<td width="10%" align="right" valign="top"><a href="pgtcl-pglowrite.html">Fast Forward</a></td> |
| 26 |
<td width="10%" align="right" valign="top"><a href="pgtcl-pglowrite.html" accesskey="N">Next</a></td> |
| 27 |
</tr> |
| 28 |
</table> |
| 29 |
<hr align="left" width="100%"></div> |
| 30 |
<h1><a name="PGTCL-PGLOREAD" id="PGTCL-PGLOREAD"></a>pg_lo_read</h1> |
| 31 |
<div class="REFNAMEDIV"><a name="AEN2006" id="AEN2006"></a> |
| 32 |
<h2>Name</h2> |
| 33 |
pg_lo_read -- read from a large object<a name="IX-PGTCL-PGLOREAD-2" id="IX-PGTCL-PGLOREAD-2"></a></div> |
| 34 |
<div class="REFSYNOPSISDIV"><a name="AEN2011" id="AEN2011"></a> |
| 35 |
<h2>Synopsis</h2> |
| 36 |
<pre class="SYNOPSIS">pg_lo_read <code class="PARAMETER">conn</code> <code class="PARAMETER">descriptor</code> <code class="PARAMETER">bufVar</code> <code class="PARAMETER">len</code></pre></div> |
| 37 |
<div class="REFSECT1"><a name="AEN2017" id="AEN2017"></a> |
| 38 |
<h2>Description</h2> |
| 39 |
<p><code class="FUNCTION">pg_lo_read</code> reads at most <code class="PARAMETER">len</code> bytes from a large object into a variable named <code class="PARAMETER">bufVar</code>.</p> |
| 40 |
</div> |
| 41 |
<div class="REFSECT1"><a name="AEN2023" id="AEN2023"></a> |
| 42 |
<h2>Arguments</h2> |
| 43 |
<div class="VARIABLELIST"> |
| 44 |
<dl> |
| 45 |
<dt><code class="PARAMETER">conn</code></dt> |
| 46 |
<dd> |
| 47 |
<p>The handle of a connection to the database in which the large object exists.</p> |
| 48 |
</dd> |
| 49 |
<dt><code class="PARAMETER">descriptor</code></dt> |
| 50 |
<dd> |
| 51 |
<p>A descriptor for the large object from <code class="FUNCTION">pg_lo_open</code>.</p> |
| 52 |
</dd> |
| 53 |
<dt><code class="PARAMETER">bufVar</code></dt> |
| 54 |
<dd> |
| 55 |
<p>The name of a buffer variable to contain the large object segment.</p> |
| 56 |
</dd> |
| 57 |
<dt><code class="PARAMETER">len</code></dt> |
| 58 |
<dd> |
| 59 |
<p>The maximum number of bytes to read.</p> |
| 60 |
</dd> |
| 61 |
</dl> |
| 62 |
</div> |
| 63 |
</div> |
| 64 |
<div class="REFSECT1"><a name="AEN2047" id="AEN2047"></a> |
| 65 |
<h2>Return Value</h2> |
| 66 |
<p>The number of bytes actually read is returned; this could be less than the number requested if the end of the large object is reached first. In event of an error, the return value is negative.</p> |
| 67 |
</div> |
| 68 |
<div class="NAVFOOTER"> |
| 69 |
<hr align="left" width="100%"> |
| 70 |
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0"> |
| 71 |
<tr> |
| 72 |
<td width="33%" align="left" valign="top"><a href="pgtcl-pgloclose.html" accesskey="P">Prev</a></td> |
| 73 |
<td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td> |
| 74 |
<td width="33%" align="right" valign="top"><a href="pgtcl-pglowrite.html" accesskey="N">Next</a></td> |
| 75 |
</tr> |
| 76 |
<tr> |
| 77 |
<td width="33%" align="left" valign="top">pg_lo_close</td> |
| 78 |
<td width="34%" align="center" valign="top"><a href="libpgtcl-ref.html" accesskey="U">Up</a></td> |
| 79 |
<td width="33%" align="right" valign="top">pg_lo_write</td> |
| 80 |
</tr> |
| 81 |
</table> |
| 82 |
</div> |
| 83 |
</body> |
| 84 |
</html> |