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.
12345
| Data type field | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | Type | Data 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. |
| 2 | Length | Data type | The length, for character varying types. |
| 3 | Precision | Data type | The precision, for numeric and some date-time types. |
| 4 | Dimension | Data type | The dimension, in case the type is an array. |
| 5 | Format | Data 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 |
1
| Date and time types | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | With timezone | Data type | Adds |
1
| Interval type | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | Interval | Data type | The fields stored by the |
1234
| Spatial types | |||
|---|---|---|---|
| # | Field | Group box | Description |
| 1 | Spatial | Data type | The spatial type (point, polygon, ...) of the |
| 2 | SRID | Data type | The spatial reference identifier of the spatial type. |
| 3 | Z | Data type | The |
| 4 | M | Data type | The |