Skip to main content
Version: 2.0.0 (latest)

3.3. Tables

Tables, or entities, are containers that store several kinds of other objects like columns, constraints, triggers, rules, indexes, policies, and partition keys. These child objects will be fully detailed in the next subsections. The table's editing dialog has the following fields:

ch3.table-dialog.general1234567

General
#FieldGroup boxDescription
1TagOptions

This attribute is used to configure the tag object associated with the table. Tags are used to visually separate tables and views, even if they belong to the same schema. Details about tags can be seen further in this chapter in the section Tags.

2Force RLS for ownerOptions

Indicates that the owner of the table should be subject to row-level security. In PostgreSQL, the default behavior is that the table owner normally bypasses RLS.

3Generate ALTER for columns / constraintsOptions

This option, when checked, indicates to pgModeler that all columns and constraints must be generated in the form of ALTER TABLE commands. This is useful when you want to do incremental modeling, that is, create objects in tables that already exist on a running PostgreSQL server. This option was useful when pgModeler lacked the diff tool. Now that the model/database comparison is present, for incremental modeling, we recommend using the diff process instead of this option.

4UnloggedOptions

Indicates that the table should not be monitored by the WAL (write-ahead log) system.

5Enable row level securityOptions

Enables the table's row security policies that restrict, on a per-user basis, which rows can be returned by normal queries or inserted, updated, or deleted by data modification commands. This option only takes effect if there are policies associated with the table. Refer to section Policies for details.

6With OIDOptions

Specifies whether each tuple in the table should have an OID (Object Identifier) associated with it. This attribute is deprecated and is present in pgModeler just for compatibility reasons, but its use is discouraged for new models.

7Edit data

Define initial data for the table

ch3.table-dialog.columns1

Columns
#FieldDescription
1Columns

The columns of the object (primary key mark, name, type, default value, attributes, alias, and comment). Use the buttons beside the list to add , edit , duplicate , remove , and reorder them. Refer to the section Columns for the column form.

ch3.table-dialog.constraints1

Constraints
#FieldDescription
1Constraints

The constraints of the table (name, type, ON DELETE, ON UPDATE, alias, and comment). Use the buttons beside the list ( ) to handle them. Refer to the section Constraints for details.

ch3.table-dialog.triggers1

Triggers
#FieldDescription
1Triggers

The triggers of the object (name, referenced table, firing time, events, alias, and comment). Use the buttons beside the list ( ) to handle them. Refer to the section Triggers for details.

ch3.table-dialog.rules1

Rules
#FieldDescription
1Rules

The rules of the object (name, execution, event, alias, and comment). Use the buttons beside the list ( ) to handle them. Refer to the section Rules for details.

ch3.table-dialog.indexes1

Indexes
#FieldDescription
1Indexes

The indexes of the object (name, indexing method, alias, and comment). Use the buttons beside the list ( ) to handle them. Refer to the section Indexes for details.

ch3.table-dialog.policies1

Policies
#FieldDescription
1Policies

The policies of the table (name, command, permissive flag, expressions, roles, alias, and comment). Use the buttons beside the list ( ) to handle them. Refer to the section Policies for details.

ch3.table-dialog.partition-keys12

Partition keys
#FieldDescription
1Partitioning

The partitioning strategy adopted by the table: None, RANGE, LIST, or HASH. Defining a table as partitioned allows the usage of partitioning relationships, which associate other tables as partitions of it. Refer to the section Relationships for details.

2Partition keys

The partition keys of the table, each one a column or an expression with its operator class, collation, and sorting. It is used when the table is configured as partitioned. Refer to the section Relationships for details about partitioning relationships.

ch3.table-dialog.tables1

Tables
#FieldDescription
1Ancestor tables

The ancestors of the table, that is, the tables linked to it through a generalization relationship. Refer to the section Relationships for details.

References​

Table DDL
https://postgresql.org/docs/current/static/sql-createtable.html

Row level security
https://postgresql.org/docs/current/static/ddl-rowsecurity.html

Table partitioning
https://www.postgresql.org/docs/current/ddl-partitioning.html