Return-Path: owner-postman Received: from LOCALHOST (LOCALHOST [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id HAA17277 for postgres-redist; Wed, 15 Jun 1994 07:27:07 -0700 Resent-From: POSTGRES mailing list Resent-Message-Id: <199406151427.HAA17277@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host LOCALHOST didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from hearnvax.nic.surfnet.nl (hearnvax.nic.surfnet.nl [192.87.5.131]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id HAA17267 for ; Wed, 15 Jun 1994 07:27:05 -0700 Received: from frontier.tno.nl by HEARNVAX.nic.SURFnet.nl (PMDF V4.2-12 #3330) id <01HDKMH5BHJ4007E3S@HEARNVAX.nic.SURFnet.nl>; Wed, 15 Jun 1994 13:21:36 +0200 (MET-DST) Received: from tpdusv.tpd.tno.nl by frontier.tno.nl (4.1/1.53) id AA01875; Wed, 15 Jun 94 13:19:00 +0200 Received: by tpdusv.tpd.tno.nl (5.65/DEC-Ultrix/4.3/GVA) id AA05432; Wed, 15 Jun 1994 13:21:15 +0200 Date: Wed, 15 Jun 1994 13:21:14 +0200 (MET DST) From: ejonge@tpd.TNO.NL (Eric de Jonge) Subject: new type & rule ?! To: postgres@postgres.Berkeley.EDU (post list) Cc: ejonge@tpd.TNO.NL (Eric de Jonge) Message-id: <9406151121.AA05432@tpdusv.tpd.tno.nl> X-Envelope-to: postgres@postgres.Berkeley.EDU X-Mailer: ELM [version 2.4 PL21] Content-type: text Content-transfer-encoding: 7BIT Content-Length: 1051 Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Wed, 15 Jun 94 07:27:07 -0700 Resent-XMts: smtp I've defined : - new data type IMAGEOBJ - operator '=' to test if IMAGEOBJ = text Example: create imclass(field=IMAGEOBJ) create teclass(field=text) contents: IMCLASS: --------------- | field | --------------- | db_600629 | --------------- | db_600636 | --------------- | db_600643 | --------------- TECLASS: --------------- | field | --------------- | db_600629 | --------------- | db_600636 | --------------- | db_600643 | --------------- AND NOW: define rule cascades is on delete to imclass do delete teclass where current.field = teclass.field So, on delete of an instance in imclass, the instance which's equal is also removed. COMMAND: delete imclass where imclass.field = "db_600643" RESULT: remove the last instance of imclass and teclass REALITY: ALL the instances of teclass were REMOVED!! Conclusion : define a rule for built-in data types with CURRENT works; => define a rule for new data types with CURRENT not?! Is this right? -- _/ Eric de Jonge _/ Email: ejonge@tpd.tno.nl ============================================================================== To add/remove yourself to/from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU" If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ==============================================================================