large objects in 7.3 - Mailing list pgsql-novice

From Dick Wieland
Subject large objects in 7.3
Date
Msg-id 000501c30b37$2029e830$0200a8c0@wiley
Whole thread Raw
Responses Re: large objects in 7.3
List 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

---

 

pgsql-novice by date:

Previous
From: Aarni Ruuhimäki
Date:
Subject: Re: Frontend to put data in a database
Next
From: "David Olbersen"
Date:
Subject: Re: ODBC & Access [Try 2]