Show TOC

Rules (Greenplum)Locate this document in the navigation structure

PowerDesigner models Greenplum rules (which allow you to define alternate actions to be performed as well or instead of insertions, updates, or deletions), as extended objects with a stereotype of <<Rule>>.

Creating a Rule

You can create a rule in any of the following ways:

  • Select Start of the navigation path Model Next navigation step Rules End of the navigation path to access the List of Rules, and click the Add a Row tool.

  • Right-click the model or package in the Browser, and select Start of the navigation path New Next navigation step Rule End of the navigation path.

Rule Properties

You can modify an object's properties from its property sheet. To open an rule property sheet, double-click its Browser entry in the Rules folder.

The following extended attributes are available on the General tab:

Name

Description

Table

Specifies the table or view the rule applies to.

Scripting name: RTable

Action

INSTEAD indicates that the commands should be executed instead of the original command. ALSO indicates that the commands should be executed in addition to the original command.

Scripting name: RAction

Event

Specifies the event that raises the rule.

Scripting name: REvent

The following extended attributes are available on the Greenplum tab:

Name

Description

Condition

Specifies any SQL conditional expression (returning boolean). The condition expression may not refer to any tables except NEW and OLD, and may not contain aggregate functions.

Scripting name: RCondition

Command(s)

Specifies the command or commands that make up the rule action. Valid commands are SELECT, INSERT, UPDATE, or DELETE.

Scripting name: RCommand