Previous Topic: Define PostgreSQL DatabasesNext Topic: Define PostgreSQL Functions


Define PostgreSQL Domains

In a model based on PostgreSQL target server, use the PostgreSQL tab in the Domain Editor to manage the data type, null option, and other properties for the selected domain.

Note: The options described here are the basic options available for most physical data types. There can be more options available depending on the physical data type you assign to the domain. For more information about using these properties, refer to PostgreSQL documentation.

To define a PostgreSQL domain

  1. Click Domains on the Model menu.

    The PostgreSQL Domain Dictionary editor opens.

  2. In the navigation grid, select the domain that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a domain. Use the Enter filter text box to filter a large list of domains to quickly locate the one that you want to define.

    Physical Name

    Specifies the physical name of the domain. Change the physical name of the domain in this field.

    Domain Parent

    Lets you select a domain from the list to attach it to the selected domain as a parent.

    Physical Data Type

    Lets you select a data type from the drop-down list to apply to the selected domain. If the selected data type requires a value for precision, scale, or both, enter the value inside the data type parentheses. For example, you can select the DECIMAL() data type and specify a precision of 2 and a scale of 10 inside the parentheses to assign the data type DECIMAL(2,10) to the selected domain.

    Schema

    Specifies the schema of the database to which the domain belongs. Select the schema from the drop-down list or click New New icon in property editors to create a new object to create one.

    Physical Only

    Specifies whether the domain is suppressed from a logical model and appears in a physical model only.

  3. Click the PostgreSQL tab and work with the following options:
    Owner

    Specifies the role or user that owns the domain. Select the owner from the drop-down list or click New New icon in property editors to create a new object to create one.

    Schema

    Specifies the schema of the database to which the domain belongs. Select the schema from the drop-down list or click New New icon in property editors to create a new object to create one.

    Collation

    Specifies an optional collation for the domain. If no collation is specified, the underlying data type's default collation is used. The underlying type must be collatable if COLLATE is specified.

    Null Option

    Specifies the usage of the NULL clause for the selected domain. You can choose to inherit or override the null option.

    Default

    Specifies a default value for columns of the domain data type. The value is any variable-free expression (but sub-queries 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.

  4. Work with other tabs in the editor to access additional domain features and click Close.

    The domain is defined and the PostgreSQL Domain Dictionary editor closes.