HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 8  System Catalog

System.RuleDef

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

SYSTEM.RULEDEF contains character strings that can be used by SQLGEN to generate the rules associated with a table when recreating a DBEnvironment. SYSTEM.RULEDEF stores the part of the rule string that begins with the WHERE clause and continues to the end of the string (not including the final semicolon).

SYSTEM.RULEDEF is initially empty, and it is updated whenever ALLBASE/SQL processes a CREATE RULE, DROP RULE, or TRANSFER OWNERSHIP statement on a rule.

When the rule is dropped, the rows making up the character string of the rule definition are deleted. If a TRANSFER OWNERSHIP is done on the rule, the owner field in this table is updated with the Name of the new owner.

Table 8-30  System.RuleDef

Column Name Type Length Description
RULENAME CHAR 20 Name of the rule
OWNER CHAR 20 Owner of the rule
QUALIFIERCHAR20Owner Name to be used to qualify any unqualified objects referenced in the rule definition.
SEGNUMINTEGER4Segment Number
SEGLENINTEGER4Length of segment in bytes (up to 64)
RULESTRINGCHAR64RULE character string segment

 

Example

   select * from system.ruledef;                                              

   --------------------+--------------------+--------------------+-----------+

   RULENAME            |OWNER               |QUALIFIER           |SEGNUM     |

   --------------------+--------------------+--------------------+-----------+

   INSERTREPORT        |PURCHDB             |PETERW              |          1|

   INSERTREPORT        |PURCHDB             |PETERW              |          2|

   DELETEREPORT        |PURCHDB             |PETERW              |          1|

   DELETEREPORT        |PURCHDB             |PETERW              |          2|

   UPDATEREPORT        |PURCHDB             |PETERW              |          1|

   UPDATEREPORT        |PURCHDB             |PETERW              |          2|



   ---------------------------------------------------------------------------

   Number of rows selected is 6

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>, or e[nd] > e





   isql=> select seglen, rulestring from system.ruledef;





   select seglen, rulestring from system.ruledef;                             

   -----------+---------------------------------------------------------------

   SEGLEN     |RULESTRING                                                     

   -----------+---------------------------------------------------------------

            57|execute procedure PurchDB.ReportMonitor (NEW.Reportname,

            26|NEW.ReportOwner, 'INSERT')

            57|execute procedure PurchDB.ReportMonitor (OLD.ReportName,

            26|OLD.ReportOwner, 'DELETE')

            57|execute procedure PurchDB.ReportMonitor (NEW.ReportName,

            26|NEW.ReportOwner, 'UPDATE')



   ---------------------------------------------------------------------------

   Number of rows selected is 6

   U[p], d[own], l[eft], r[ight], t[op], b[ottom], pr[int] <n>, or e[nd] > e


Feedback to webmaster