.\" 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_WRITE" "" "17 September 2020" "" "PostgreSQL Tcl Interface Documentation"

.SH NAME
pg_lo_write \- write to a large object

.SH SYNOPSIS

.nf
pg_lo_write \fIconn\fR \fIdescriptor\fR \fIbuf\fR \fIlen\fR
.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.
