Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA28901; Thu, 3 Sep 92 14:56:03 -0700
Message-Id: <9209032156.AA28901@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: Pure-File Large Objects
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: clarsen@postgres.berkeley.edu
In-Reply-To: Your message of "Wed, 02 Sep 92 13:07:17 PDT."
             <9209022007.AA14295@postgres.Berkeley.EDU> 
Date: Thu, 03 Sep 92 14:55:56 PDT


you write:
> 
> Now, how do I get at these large objects from libPQ?
> Can I just do a p_open("image1.data", O_RDONLY)? If so, that
> does not seem to work. (But maybe it's pilot error.)

The manual is out of date.

You want to use p_creat("image1.data",INV_WRITE,Inversion) and then use 
p_write on the resultant file descriptor to create your large object.

To read back in, use p_open("image1.data",INV_READ).

-Case Larsen
