I have a few questions about “large objects” in postreSQL 7.3 .
I see from the documentation that
(1) there is a table name pg_largeobject that seems to be the place where large objects are stored.
(2) Likewise there are psql commands (lo_list, lo_import, lo_export, lo_unlink) … lo_list seems to work,
but the others require some parameters, the format of which is not documented)
(2) there is an example where server side built-in functions are used to apparently do 2 things
(a) import a large object into pg_largeobject, and assign it an loid
(b) and then insert that loid into the oid column in table “image”
CREATE TABLE image (
name text,
raster oid
);
INSERT INTO image (name, raster)
VALUES ('beautiful image', lo_import('/etc/motd'));
SELECT lo_export(image.raster, '/tmp/motd') FROM image
WHERE name = 'beautiful image';
One question is …
is this actually what’s going on (can’t find any other documentation) ?
another question is … how does one use \lo_import in psql?
and finally
the test program does not run on a remote database. Is there any way to manipulate large objects
(import, export, read, write, etc.) on a remote database?
Thanks,
Dick Wieland
---