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

Subscribe to our news:
Partners
Testimonials
Jad Cooper: "Your program is the best. I have only few hours but now I make very great data for my meeting".
Armin Braunstein: "Also I must say, that your PostgreSQL Maestro tool is the best tool for PostgreSQL I have seen. For general I am really happy about the tool and how it works".

More

Add your opinion

PostgreSQL Maestro online Help

Prev Return to chapter overview Next

Range Types

Range types are data types representing a range of values of some element type (called the range's subtype). For instance, ranges of timestamp might be used to represent the ranges of time that a meeting room is reserved. In this case the data type is tsrange (short for "timestamp range"), and timestamp is the subtype. The subtype must have a total order so that it is well-defined whether element values are within, before, or after a range of values.

 

Range types are useful because they represent many element values in a single range value, and because concepts such as overlapping ranges can be expressed clearly. The use of time and date ranges for scheduling purposes is the clearest example; but price ranges, measurement ranges from an instrument, and so forth can also be useful.

 

 

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

 

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

or

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

 

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

 

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

 

 

 

Range data types can be edited within Range Type Editor. In order to run the editor you should either

 

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

 

 

 

To drop a range data type:

 

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

 

and confirm dropping in the dialog window.

 



Prev Return to chapter overview Next