lo_truncate

Function

Truncate a large object to a given length.

Prototype

int lo_truncate(PGconn* conn, int fd, size_t len);

Parameter

Table 1 lo_truncate parameters

Keyword

Parameter Description

conn

A database connection

fd

File descriptor

len

The length to be truncated

Return Value

int Returns 0 on success and -1 on failure.

lo_truncate64

Function

Truncate a large object that may exceed 2GB in size to a given length.

Prototype

int lo_truncate64(PGconn *conn, int fd, long int len);

Parameter

Table 1 lo_truncate64 parameter

Keyword

Parameter Description

conn

A database connection

fd

File descriptor

len

The length to be truncated

Return Value

int Returns 0 on success and -1 on failure.

Example

For details, see Example.

Feedback
编组 3备份
    openGauss 2024-05-19 00:42:09
    cancel