In the object hierarchy under every schema are Domains. You can add a domain by selecting CREATE DOMAIN from the Domains context menu. Once a domain has been created, it can be commented on and dropped. This section describes how to create, comment on, and drop a domain with Administrator.
To create a domain, expand the database and schema under which you wish to create the domain (click the [O-] beside the database and schema names).
Right-click on Domains and select CREATE DOMAIN.
The first field is the name of the domain. Type: new_domain
Now specify the data type upon which the domain is to be based. Use the schema-qualified selection boxes to specify the data type: pg_catalog.char
Type the letter a as the Default value for the domain and select No Domain Constraints.
Click OK to create the domain.
Note that the domain new_domain has been added under the Domains node in the Tree View.
Administrator also enables you to perform the following operations on existing domains:
PostgreSQL allows commenting on domains to allow for easier identification. To comment on a domain, right-click on it and select COMMENT. A dialog prompts for the comment. If there is already a comment on the domain it is displayed. Enter the new comment in the entry box and click OK to save the new comment.
To drop a domain, right-click on it and select either DROP RESTRICT or DROP CASCADE. DROP RESTRICT will not drop the domain if there are any dependent objects. DROP CASCADE automatically drops the domain and all objects that depend on it.
If Preferences => Ask For Confirmations is enabled, you are asked to confirm that you want the domain dropped (and all the dependent objects in case of a DROP CASCADE); if it is disabled, the domain is dropped immediately (along with its dependent objects if DROP CASCADE was selected). This action cannot be undone.
To learn more about domains, refer to the PostgreSQL 7.3 Reference Manual.