Choose your SQL server:
AnySQL
MySQL
MS SQL Server
PostgreSQL
Oracle
SQL Anywhere
DB2
SQLite
Firebird
MaxDB

Subscribe to our newsletter

PostgreSQL Maestro online Help

Prev  Return to chapter overview Next 

Composite Types

A composite type describes the structure of a row or record; it is in essence just a list of field names and their data types. PostgreSQL allows values of composite types to be used in many of the same ways that simple types can be used. For example, a column of a table can be declared to be of a composite type.

 

 

New  composite types are created within Create Composite Type Wizard. In order to run the wizard you should either

 

select the Object | Create Database Object... main menu item;
select the Composite Type icon in the Create Database Object dialog

or

select the Composite Types list or any object from that list in the explorer tree;
select the Create New Composite Type... item from the popup menu

or

open the schema in Schema Editor and the Composite Types tab there;
press the Insert key or select the Create New Composite Type item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

       

To create a new composite type with the same properties as one of the existing composite type has:

 

select the Object | Duplicate Database Object... main menu item;
follow the instructions of Duplicate Object Wizard.

 

 

 

Composite Types can be edited within Composite Type Editor. In order to run the editor you should either

 

select the composite type for editing in the explorer tree (type the first letters of the composite type name for quick search);
select the Edit Composite Type ... item from the popup menu

or

open the schema in Schema Editor and the Composite Types tab there;
select the composite type to edit;
press the Enter key or select the Edit Composite Type item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

 

 

 

To drop a composite type:

 

select the composite type to drop in the explorer tree;
select the Drop Composite Type item from the popup menu

or

open the schema in Schema Editor and the Composite Types tab there;
select the composite type to drop;
press the Delete key or select the Drop Composite Type item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

 

and confirm dropping in the dialog window.

 



Prev  Return to chapter overview Next