PGlarge (Class)

In: postgres.c
Parent: Object

The class to access large objects. An instance of this class is created as the result of PGconn#lo_import, PGconn#lo_create, and PGconn#lo_open.

Methods

close   export   oid   open   read   seek   size   tell   unlink   write  

Public Instance methods

Closes a large object. Closed when they are garbage-collected.

Saves the large object to a file.

Returns the large object’s oid.

Opens a large object. The mode argument specifies the mode for the opened large object, which is either INV_READ or INV_WRITE.

Attempts to read length bytes from large object. If no length is given, reads all data.

Move the large object pointer to the offset. Valid values for whence are SEEK_SET, SEEK_CUR, and SEEK_END. (Or 0, 1, or 2.)

Returns the size of the large object.

Returns the current position of the large object pointer.

Deletes the large object.

Writes the string str to the large object. Returns the number of bytes written.

[Validate]