Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA03180; Mon, 29 Jun 92 17:05:09 -0700
Date: Mon, 29 Jun 92 17:05:09 -0700
From: Otago University Database Research Group <DBPOST@otago.ac.nz>
Subject: Problems with "abstime" data type and multiple rules
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: postgres@postgres.berkeley.edu
Message-Id: <01GLTP7OVXC09TDYEX@otago.ac.nz>
X-Envelope-To: postgres@postgres.berkeley.edu
X-Vms-To: IN%"postgres@postgres.berkeley.edu"

         Problems with "abstime" data type

a) "now" does not work from within a rule

    example : define rule history1 is
              on delete to emp
              do append emp_his
              (emp_n=current.emp_n,
               date_gone="now")

always enters into the "date_gone" the same time, perhaps the time the
rule was created, and not the system time the tuple was deleted.

b)  The command :

       retrieve (emp.emp_n)
       where emp.tmin > "now" - "@ 30 days"

does not work. Am I doing something wrong ?

c) The data type "abstime" requires entering the time as well !!
   For example I cannot enter "Jun 17 1990".  Why ?

d) Rules cannot be put into one unix file and later be loaded. They need
   on file each.

e) The rules:
              on retrieve to owner.owncat
               where owner.owncat="PE"
              do instead retrieve (owncat="Person")
    and
               on retrieve to owner.owncat
               where owner.owncat="CO"
              do instead retrieve (owncat="Company")

do not work at the same time.   What is wrong ?



                                            Elikkos Elia
                                          University of Otago
                                          Duinedin - New Zealand
