Online Documentation for SQL Manager for PostgreSQL

Creating/editing domain

Use the Domain tab of Domain Editor to create/edit a domain and specify its definition.




Select a schema and enter a name for the new domain, or modify the name of the domain being edited.


Domain Editor - Editing domain definition


Data type

Select the underlying data type of the domain from the drop-down list, and set its size, precision, if required for the selected data type. To create an array of the chosen type, use the Number of array dimensions spinner control.



CheckBox Not Null

If enabled, specifies that values of this domain are not allowed to be null.


Default value

This specifies a default value for columns of the domain data type. The value is any variable-free expression (but subqueries are not allowed). The data type of the default expression must match the data type of the domain. If no default value is specified, then the default value is the null value.

The default expression will be used in any insert operation that does not specify a value for the column. If a default value is defined for a particular column, it overrides any default associated with the domain. In turn, the domain default overrides any default value associated with the underlying data type.