Subject: Re: LIBPQ large object interface

From: [email-masked] (Raj Vadakkencherry)
Date: Mon, 12 Sep 1994 11:11:21 -0700 (PDT)

Hi,

 As a related question (I'm using LIBPQ interface to large objects),
 how can I delete a large object file that I create using p_creat and
 p_write calls ?

 You mention that the file is created with the name LOxxxxx and is located
 in the database directory. But this directory is off limits for regular
 users (ie., no read permission) and so the Large object file cannot be
 deleted using regular unix commands.

 Is there any way I can delete the file from within LIBPQ or otherwise ?

Raj.

> [email-masked] (Raj Vadakkencherry) writes:
> > When I'm done writing, I issue a p_close command and exit successfully,
> > but the file is not visible in the Unix file system.
> 
> the file will not be visible with the same name you give it.  the
> /-delimited path is only useful within the virtual inversion file
> system.  instead, it will have the name LOxxxxxx where xxxxxx is the
> object id of the tuple in pg_naming that corresponds to the file name.
> this file is located in the database directory.
> 
> if you want to use files that are visible within the regular unix name
> space, you must use the external large object interface.  this is
> turned off in the distribution for security reasons; see the LARGE
> OBJECT ref manual page.
> --
>   Paul M. Aoki          |  University of California at Berkeley
>   [email-masked]  |  Dept. of EECS, Computer Science Division (#1776) 
>                         |  Berkeley, CA 94720-1776
> 

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 12 Sep 94 11:53:00 -0700

>  how can I delete a large object file that I create using p_creat and

there's a p_unlink call documented in the reference manual.  this should
work for large objects of type Unix.

i don't think there's any way to unlink large objects of type Inversion 
(e.g., those created by icopy) aside from prm/p_unlink'ing them and 
then removing the Xinv???? class by hand.
--
  Paul M. Aoki          |  University of California at Berkeley
  [email-masked]  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776