agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Eric de Jonge <ejonge@tpd.TNO.NL>
To: post list <postgres@postgres.Berkeley.EDU>
Cc: Eric de Jonge <ejonge@tpd.TNO.NL>
Subject: new type & rule ?!
Date: Wed, 15 Jun 1994 13:21:14 +0200 (MET DST)
Message-ID: <9406151121.AA05432@tpdusv.tpd.tno.nl> (raw)
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.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: ejonge@tpd.TNO.NL
Subject: Re: new type & rule ?!
In-Reply-To: <9406151121.AA05432@tpdusv.tpd.tno.nl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox