lo_import

Function

Import a server-side operating system file into a large object.

Prototype

Oid lo_import(PGconn* conn, const char* filename);

Parameter

Table 1 lo_import parameters

Keyword

Parameter Description

conn

A database connection

filename

The path to the file to be imported

Return Value

oid The return value is the OID that was assigned to the new large object, or InvalidOid (zero) on failure.

lo_import_with_oid

Function

Importing a server-side operating system file into a large object with a specified OID will result in an error if the OID has already been used by a large object.

Prototype

Oid lo_import_with_oid(PGconn* conn, const char* filename, Oid lobjId);

Parameter

Table 1 lo_import_with_oid parameter

Keyword

Parameter Description

conn

A database connection

filename

The path to the file to be imported

lobjId

The OID of the large object to be imported

Return Value

oid The return value is the OID that was assigned to the new large object, or InvalidOid (zero) on failure.

Example

For details, see Example.

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