Skip to main content
Version: 2.0.0 (latest)

2.2. Version specific fields

One of the main pgModeler features is the generation of SQL code from a database model, but depending on the kind of objects, the user must pay attention to the attributes filled in these objects. Since a DDL command for a specific object can vary from version to version of PostgreSQL, pgModeler tries to handle this situation through its dynamic code generation mechanism that takes into account the version of the target database, detected during export.

Throughout pgModeler's forms, it's common to find fields whose labels are highlighted in bold and underlined, like the options marked in the images below, where the tooltip of each of them is shown. A highlighted field is available only in some PostgreSQL versions. The versions are informed in the field's tooltip (for example, PostgreSQL<= 11.0), so think twice when assigning values to these fields to avoid warnings or even error messages coming from a PostgreSQL server. If you need to use them, you must export the model to a server whose version matches the one informed in the field's tooltip.

ch2.version-specific.table1

Table
#FieldDescription
1With OID

Creates the table with OIDs, a system column that identifies each row. Available on PostgreSQL 11 or earlier.

ch2.version-specific.column1

Column
#FieldDescription
1Generated

Makes the column a generated one, whose value is computed from other columns. Available on PostgreSQL 12 or later.

ch2.version-specific.constraint12

Constraint
#FieldDescription
1Nulls not distinct

Makes the unique constraint consider null values as equal (NULLS NOT DISTINCT). Available on PostgreSQL 15 or later.

2Temporal key

Creates a temporal key (WITHOUT OVERLAPS in primary keys and unique constraints). Available on PostgreSQL 18 or later.