Skip to main content
Version: 2.0.0 (latest)

2.3. Data type field

The data type widget is one of the most used fields in pgModeler's forms. The purpose of this control is to quickly assign a data type to objects without writing a single line of code. This field is a polymorphic one, which means that new fields appear as the user chooses the type that demands some advanced attribute. The data type widget is capable of handling all PostgreSQL built-in types, extended types like PostGIS spatial types, and user-defined types. The picture below shows the basic shape of this control.

ch2.data-type.basic12345

Data type field
#FieldGroup boxDescription
1TypeData type

The name of the type being configured. The user can type the name of the data type to quickly locate it without expanding the listing completely. User-defined types, including domains, extensions, sequences, tables and views, are listed too, with schema-qualified names.

2LengthData type

The length, for character varying types.

3PrecisionData type

The precision, for numeric and some date-time types.

4DimensionData type

The dimension, in case the type is an array.

5FormatData type

Shows the type as it will be written in the SQL code, so the user can check if it is configured as desired. If an unknown type is typed in the field Type, it displays invalid_type in red, and assigning it to an object will generate errors.

ch2.data-type.datetime1

Date and time types
#FieldGroup boxDescription
1With timezoneData type

Adds with time zone to the time and timestamp types.

ch2.data-type.interval1

Interval type
#FieldGroup boxDescription
1IntervalData type

The fields stored by the interval type (for example, YEAR or DAY TO SECOND).

ch2.data-type.spatial1234

Spatial types
#FieldGroup boxDescription
1SpatialData type

The spatial type (point, polygon, ...) of the geometry and geography types.

2SRIDData type

The spatial reference identifier of the spatial type.

3ZData type

The Z variation: the spatial type has a third coordinate.

4MData type

The M variation: the spatial type has a measure value.