.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $
.TH "PG_LO_READ" "" "2007-09-16" "" "PostgreSQL 7.4.18 Documentation"
.SH NAME
pg_lo_read \- read from a large object

.SH SYNOPSIS
.sp
.nf
pg_lo_read \fIconn\fR \fIdescriptor\fR \fIbufVar\fR \fIlen\fR
.sp
.fi
.SH "DESCRIPTION"
.PP
\fBpg_lo_read\fR reads at most
\fIlen\fR bytes from a large object into a
variable named \fIbufVar\fR.
.SH "ARGUMENTS"
.TP
\fB\fIconn\fB\fR
The handle of a connection to the database in which the large object
exists.
.TP
\fB\fIdescriptor\fB\fR
A descriptor for the large object from
\fBpg_lo_open\fR.
.TP
\fB\fIbufVar\fB\fR
The name of a buffer variable to contain the large object
segment.
.TP
\fB\fIlen\fB\fR
The maximum number of bytes to read.
.SH "RETURN VALUE"
.PP
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.
