Domains Wizard (PostgreSQL)
Go Up to PostgreSQL Object Wizards
This wizard lets you build and submit a CREATE DOMAIN... AS... statement, adding a new, datatype-based domain.
- Note: Before working with this object type, consult PostgreSQL documentation for details on topics such as NULL and default values. For more information, see Accessing Third Party Documentation.
To create a new domain using a wizard:
- Open a creation wizard for a domain. For details, see Opening an Object Wizard.
- Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
- Properties panel - Domains (PostgreSQL) - Properties.
- Constraints panel - Domains (PostgreSQL) - Constraints.
- Comment panel - for details, see Adding a Comment to an Object.
- DDL View panel - for details, see Previewing the DDL Generated to Create the New Object.
- Finally, use the Execute button to create the object.
Domains (PostgreSQL) - Properties
When creating or editing a domain, this tab/panel lets you work with the following settings:
Setting | Description |
---|---|
Owner and Schema |
Lets you select the schema and owner of the new domain. |
Datatype |
Lets you provide a name for the new domain. |
Type |
Lets you select the underlying datatype of the new domain. |
Allow Nulls |
If unselected, a NOT NULL parameter is included with the generated DDL, generally assuring that the domain cannot take a NULL value. |
Default |
Lets you enter a value or expression that defines the default value for columns of this domain type. |
Collation Schema and Collation Name |
Let you provide the value of a COLLATE parameter, specifying an optional collation for the domain. |
Domains (PostgreSQL) - Constraints
When creating or editing domains, this tab/panel lets you manage foreign key, primary key, unique key, exclusion constraints, and check constraints for the domain:
- Click Add to open the Check Constraints Wizard. Use the wizard to create a new constraint for the domain. See Check Constraints Wizard (PostgreSQL)
- Select an existing constraint and click Edit to open a wizard that lets you add modify that constraint. See Check Constraints Editor (PostgreSQL)
- Select a constraint and click Drop to drop a constraint from the table.