- _lo_import
_lo_import FILE_NAME 'COMMENT'
'_lo_import' puts the large object to the database by specifing a file name and comment. When registered normally, "BEGIN", "INSERT OID", and "COMMIT" messages are displayed.
ex)
pgbash> _lo_import member.dat 'member data'
BEGIN
INSERT 118868 1
COMMIT
- _lo_export
'_lo_export' gets the large object from the database, and writes it to a file.
ex)
_lo_export 11885 /tmp/mm
- _lo_unlink
'_lo_unlink' deletes the large object from the database. When deleted normally, "BEGIN", "DELETE count", and "COMMIT" messages are displayed.
ex)
_lo_unlink 11885
BEGIN
DELETE 1
COMMIT
- _lo_list
_lo_list displays the list of the large objects.
pgbash> _lo_list
objoid | description
--------+--------------
118865 | member data1
118867 | member data2
(2 rows)
'pgbash_description' table
Pgbash registers a large object OID and comment into the "pgbash_description" table.
The "pgbash_description" table is created automatically.
A user, not a postgres super user, can register a large object, because the pgbash_description table are created as a user's privilege.
|