pg_lo_truncate

Name

pg_lo_truncate -- Truncate a large object to a given length

Synopsis

pg_lo_truncate conn descriptor length

Description

pg_lo_truncate truncates the specified large object to the given length. If the length is greater than the current large object length, the large object is extended with null bytes.

Arguments

conn

The handle of a connection to the database in which the large object exists.

descriptor

A descriptor for the large object from pg_lo_open.

length

The length to which the large object is to be truncated or padded.

Return Value

A zero-based offset in bytes suitable for input to pg_lo_lseek.