3.3. Tables

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

Attribute Description
Tag This attribute is used to configure the tag object associated to the table. Tags are used to graphically separate tables and views even if they are owned by the same schema. Details about tags can be seen further in this chapter on section Tags.
With OID Specifies if each tuple in the table should have an OID (Object Identifier) associated. This attribute is considered deprecated and is present in pgModeler just for compatibility reasons but its use is discouraged for new models.
Enable row level security 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 take effect if there are policies associated to the table. Refer to section Policies for details.
Force RLS for owner Indicates that the owner of the table should be subject to the row level security. In PostgreSQL the default behaviour is that table owners normally bypass RLS.
Unlogged Indicates that table should not be monitored by the WAL (write ahead log) system.
Generate ALTER for
columns/constraints
This option, when checked, indicates to pgModeler that all columns and constraints must be generated in form of ALTER TABLE commands. This is useful when you want to do an incremental modeling, that is, create objects in tables that already exists on a running PostgreSQL server. This option was useful when pgModeler lacked the diff tool. Now that the model/database comparing is present, for incremental modeling, we recommend the use of diff process instead of this option.
Columns This tab lists and allows the handling of all columns associated to the table. Refer to section Columns for details.
Constraints This tab lists and allows the handling of all constraints associated to the table. Refer to section Constraints for details.
Rules This tab lists and allows the handling of all rules associated to the table. Refer to section Rules for details.
Indexes This tab lists and allows the handling of all indexes associated to the table. Refer to section Indexes for details.
Policies This tab lists and allows the handling of all policies associated to the table. Refer to section Policies for details.
Partition keys This tab lists and allows the handling of all partition keys associated to the table. This is used when the table is configured as a partitioned table. Defining a table as partitioned allows the usage of partitioning relationships making other tables to be associated as partitions of the former. Refer to section Relationships for details about partitioning relationships.
Partitioning This field is found in the Partition keys tab and defines the partitioning strategy adopted by the table. Possible values are None, RANGE,LIST and HASH.
Tables This tab lists all ancestors of the table. Ancestor tables are the ones that are linked to this table through a generalization relationship. Refer to section Relationships for details.

** 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

Mar 17, 2020 at 13:16