EPUB | CHM | PDF

Table Editor

Top Previous Next

The Table Editor dialog window is intended for editing the following properties of a diagram table: general and database-specific table options (table name, etc.); table columns, table indexes, table constraints, table rules, display options and others.

To open Table Editor, simply double-click on a table in the diagram or select the Properties item from the table context menu.

Table Editor consists of several tabs, please see the detailed description below.

General

editor-table-general

This tab allows you to adjust the basic table properties, which are used for generating CREATE TABLE or ALTER TABLE statements for executing on the PostgreSQL server.

Table name

The name of the table must be unique within the schema. To check your diagram for the uniqueness of table names use the Check Diagram tool.

Table schema

The name of the schema where your table will be created.

WithOIDs

This optional clause specifies whether the rows of your new table should have OIDs (object identifiers) assigned to them.

Owner

A role which will be owner of the object, or a role which will execute CREATE script in case of empty input field.

Tablespace

The name of a tablespace. A tablespace allows you to define an alternative location on the file system where the data files containing database objects (such as tables and indexes) may reside. You can manage tablespaces using SQL commands such as CREATE TABLESPACE and ALTER TABLESPACE.

Temporary

This option allows you to create a temporary table, i.e. a table which drops itself at the end of the session.

Fill Factor

The fillfactor for a table is a percentage between 10 and 100. 100 (complete packing) is the default. When a smaller fillfactor is specified, INSERT operations pack table pages only to the indicated percentage; the remaining space on each page is reserved for updating rows on that page. This gives UPDATE a chance to place the updated copy of a row on the same page as the original, which is more efficient than placing it on a different page. For a table whose entries are never updated, complete packing is the best choice, but in heavily updated tables smaller fillfactors are appropriate.

OnCommit

The behavior of temporary tables at the end of a transaction block. The three options are:

PRESERVE ROWS

No special action is taken at the ends of transactions. This is the default behavior.

DELETE ROWS

All rows in the temporary table will be deleted at the end of each transaction block. Essentially, an automatic TRUNCATE is done at each commit.

DROP

The temporary table will be dropped at the end of the current transaction block.

Comments

A comments for your table.

Inherit From

This list specifies tables from which the new table automatically inherits all columns.

Generate Table

Set this option off to exclude the table from the default selection of generated tables in the Database Generation and Database Modification tools.

Columns

Use the Columns tab for adding, modifying, and deleting table columns. Please see the topic Column Editor for the detailed information.

Constraints

Use the Constraints tab for managing constraints. Please see the Constraint Editor topic for the detailed information.

Indexes

The Indexes tab is intended for managing table indexes. Please see the Index Editor topic for the detailed information.

Triggers

The Triggers tab is intended for managing table triggers. Please see the Trigger Editor topic for the detailed information.

Rules

The Rules tab is intended for managing table rules. Please see the Rule Editor topic for the detailed information.

Script

This tab allows you to set SQL statements, which will be executed before (use Begin tab) and after (use End tab) generation of the table.

Preview

The Preview tab displays the SQL statement, which will be executed during the database generation. This statement is made up according to the changes you have made using previous tabs. Note, that the text within the editor is read-only.

Note

The Note tab allows you to define a description and an annotation for the edited table. This properties will not affect the physical PostgreSQL database, but they can be useful for your diagram development.

Format

These options allow you to set table line and fill color for displaying on the diagram, different from the default table colors, which are defined within the Diagram Display Preferences dialog.

See also:
Database Modification | SQL Table Definition
Diagram Objects: Column Editor | Domain Manager | Index Manager | Formatting Table | Tables in Tree View Window | Table Manager
Database Functions: Database Generation
Diagram: Diagram Display Preferences