Subject: Problem with rules

From: <[email-masked]>
Date: Fri, 4 Sep 1992 12:52:44 -0500

Greetings,

I am trying to use postgres rules in version 4.0.1 on a Sun Sparc OS 4.1.1.
The example below does not seem to work for me, can anyone tell me what I am
doing wrong.

kadet% createdb dp1
kadet% monitor dp1
Welcome to the C POSTGRES terminal monitor

Go 
* create c1 (s1 = char16) \g

Query sent to backend is "create c1 (s1 = char16) "
CREATE
Go 
* append c1 (s1 = "randy") \g

Query sent to backend is "append c1 (s1 = "randy") "
APPEND 20075
Go 
* append c1 (s1 = "dave") \g

Query sent to backend is "append c1 (s1 = "dave") "
APPEND 20076
Go 
* define rule r1 is
on retrieve to c1 where current.s1 = "dave"
do instead nothing \g

Query sent to backend is "define rule r1 is on retrieve to c1 where current.s1 = "dave" do instead nothing "
DEFINE
Go 
* retrieve (c1.all) \g

Query sent to backend is "retrieve (c1.all) "
WARN:Sep  4 09:02:54:View Rules must not have parameters!

s!

Go 
* remove rule r1 \g

Query sent to backend is "remove rule r1 "
REMOVE
Go 
* retrieve (c1.all) \g

Query sent to backend is "retrieve (c1.all) "
---------------
| s1          |
---------------
| randy       |
---------------
| dave        |
---------------

Thanks for your help.

 ____________________________________________________________________________
|                           |                            ________            |
|     Randy S Johnston      | Alliant Techsystems, Inc. |        |           |
| Senior Research Scientist | Research and Technology   |        |           |
|   [email-masked]    | Mail Stop MN11-1610       | ALLIANT|TECHSYSTEMS|
|   Voice: (612) 931-6084   | 600 2nd St., NE           |        |           |
|    Fax: (612) 931-6165    | Hopkins, MN 55343         |________|           |
|___________________________|________________________________________________|