Subject: Is there such a feature ?

From: [email-masked] (Wolf-D. Ihlenfeldt)
Date: Sat, 28 Aug 93 19:11:21 jst

I am using Postgres4.1 on Sparc.

I have a control table Control, which stores attributes of other tables.
I would like to have an automatic update of the control table 
whenever one of the other tables is destroyed. Something like

define rewrite rule Destruction is on destroy to TableX do delete Control where Control.relname = "TableX"

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 ?

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 ?

WDI

---

From: [email-masked] (Paul M. Aoki)
Date: Sat, 28 Aug 93 17:46:20 -0700

> something or can we expect this feature in 4.2 ?

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

> PostQuel query to remove the directories and their contents - 

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  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki