.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "PG_LO_READ" "" "17 September 2020" "" "PostgreSQL Tcl Interface Documentation"

.SH NAME
pg_lo_read \- read from a large object

.SH SYNOPSIS

.nf
pg_lo_read \fIconn\fR \fIdescriptor\fR \fIbufVar\fR \fIlen\fR
.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.
