large objects in 7.3

From: "Dick Wieland" <dick(dot)wieland(at)wiline(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: large objects in 7.3
Date: 2003-04-25 14:29:47
Message-ID: 000501c30b37$2029e830$0200a8c0@wiley
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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
---

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David Olbersen 2003-04-25 14:34:14 Re: ODBC & Access [Try 2]
Previous Message Aarni Ruuhimäki 2003-04-25 13:41:33 Re: Frontend to put data in a database