create rule

Started by Jose' Soaresabout 27 years ago2 messages
#1Jose' Soares
jose@sferacarta.com

Hi all,

Seems that no one of the examples on 'man create_rule' does works.
What about to try every example on man pages?
Seems that's posssible to create a rule on event SELECT only to define
views
Am I wrong ?

I'm trying to create a rule like this:

create rule my_rule as
on select to employees
do instead select INITCAP(ename),
UPPER(empno,
UPPER(job),
hiredate,
sal,
comm,
deptno,
level,
mgr
from employees;

Any ideas?

Thanks,

-Jose'-

#2Noname
jwieck@debis.com
In reply to: Jose' Soares (#1)
Re: [HACKERS] create rule

Hi all,

Seems that no one of the examples on 'man create_rule' does works.
What about to try every example on man pages?
Seems that's posssible to create a rule on event SELECT only to define
views
Am I wrong ?

You're right and the man page for CREATE RULE is outdated.
Rules on the SELECT event are 100% restricted to view
definitions now (one single instead action that selects
exactly the same attribute types and names the relation
itself has).

I must still update that man page, thanks.

In the meantime you might want to take a look at the rule
system documentation of the programmers manual, which I've
written entirely from scratch after the fixes to the rule
system for v6.4.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #