Return-Path: postman 
Delivery-Date: Sat, 28 Aug 93 17:40:48 PDT
Return-Path: postman
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA08818; Sat, 28 Aug 93 17:36:35 -0700
Resent-From: postman (POSTGRES mailing list)
Resent-Message-Id: <9308290036.AA08818@postgres.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: aoki@postgres.Berkeley.EDU
Received: from faerie.CS.Berkeley.EDU by postgres.Berkeley.EDU (5.61/1.29)
	id AA08810; Sat, 28 Aug 93 17:36:29 -0700
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.1C/8.1B) with SMTP id RAA07799; Sat, 28 Aug 1993 17:46:20 -0700
Message-Id: <199308290046.RAA07799@faerie.CS.Berkeley.EDU>
From: aoki@postgres.berkeley.edu (Paul M. Aoki)
To: wolf@molout.tutkie.tut.ac.jp (Wolf-D. Ihlenfeldt)
Cc: postgres@postgres.berkeley.edu
Subject: Re: Is there such a feature ? 
In-Reply-To: Your message of Sat, 28 Aug 93 19:11:21 jst 
	     <9308281011.AA03495@molout.tutkie.tut.ac.jp> 
Date: Sat, 28 Aug 93 17:46:20 -0700
X-Sender: aoki@postgres.Berkeley.EDU
X-Mts: smtp
Resent-To: postgres-dist
Resent-Date: Sat, 28 Aug 93 17:36:34 PDT

wolf@molout.tutkie.tut.ac.jp (Wolf-D. Ihlenfeldt) writes:
> Unfortunately (and its documented) you cannot define rules on  'destroy'
> events, only on retrieve,replace,delete and append. Did I overlook
> something or can we expect this feature in 4.2 ?

i don't know of any plans to add this..

> But I do not need only the control table cleanup, but those 
> extra tables have also attached directories in the inversion
> file system, named something like /TableX. I also would like to 
> clean up these directories on destruction. It seems you have to
> use currently the p_* routines in libpq to do this - you cannot formulate a
> PostQuel query to remove the directories and their contents - 
> or can you ?

in theory you should be able to say
	retrieve (x=LOunlink("/myfilename"::filename))\g
(at least, this works in our development system).

there is no recursive unlink primitive, of course.  (just as in unix,
this is for the "rm" command to implement, not the file system.)

btw, the fact that removing filename pointers to inversion objects does
not remove the large object from the database is a feature (since there 
can be multiple pointers to a given object)..

the additional fact that the unlinking routine doesn't unlink the 
unix files is a bug.  (stay tuned.) :-)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
