.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $
.TH "PG_LO_WRITE" "" "2007-09-16" "" "PostgreSQL 7.4.18 Documentation"
.SH NAME
pg_lo_write \- write to a large object

.SH SYNOPSIS
.sp
.nf
pg_lo_write \fIconn\fR \fIdescriptor\fR \fIbuf\fR \fIlen\fR
.sp
.fi
.SH "DESCRIPTION"
.PP
\fBpg_lo_write\fR writes at most
\fIlen\fR bytes from a variable
\fIbuf\fR to a large object.
.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\fIbuf\fB\fR
The string to write to the large object (not a variable name,
but the value itself).
.TP
\fB\fIlen\fB\fR
The maximum number of bytes to write. The number written will
be the smaller of this value and the length of the string.
.SH "RETURN VALUE"
.PP
The number of bytes actually written is returned; this will ordinarily
be the same as the number requested.
In event of an error, the return value is negative.
