PgDesigner

Lint Rules Reference — PostgreSQL Schema Validation

PgDesigner validates your schema against 66 built-in lint rules grouped into three severity levels. Errors block DDL generation. Warnings indicate valid but likely problematic constructs. Info rules are suggestions for best practices. Rules marked as fixable can be resolved automatically using the autofix action.

Errors (E)

32 rules — block DDL generation.

Code Description Fixable
E001object has an empty name—
E002identifier exceeds 63 chars—
E003duplicate table in schema—
E004duplicate column in table—
E005duplicate index name in schema—
E006duplicate constraint name in table—
E007PK references unknown column—
E008FK references unknown local column—
E009FK references unknown table—
E010FK references unknown target column—
E011index references unknown column—
E012index references unknown table—
E013UNIQUE references unknown column—
E014enum has no labels—
E015duplicate enum label—
E016composite type has no fields—
E017table has no columns—
E018unknown data type—
E019INCLUDE references unknown column—
E020duplicate schema name—
E021FK has no columns—
E022partition key references unknown column—
E023trigger references unknown table—
E024policy references unknown table—
E025invalid sequence type—
E026EXCLUDE references unknown column—
E027domain base type unknown—
E028function has no body—
E029function has no language—
E030view has no query—
E031table has multiple identity columns (PG allows only one)—
E032PK/UNIQUE must include all partition key columns—

Warnings (W)

21 rules — DDL is valid but a problem likely exists.

Code Description Fixable
W001FK column type mismatch—
W002FK columns have no matching indexYes
W003circular FK dependency—
W004table has no primary keyYes
W005duplicate index columnsYes
W007naming convention violation—
W008partitioned table has no children—
W009orphan partition—
W010identity column has defaultYes
W011generated column has defaultYes
W012PK column is nullableYes
W013sequence has no owned-by—
W014layout references unknown table—
W015FK uses NO ACTION defaultYes
W016FK to non-unique column—
W017overlapping index (prefix)Yes
W018duplicate FKYes
W019self-referencing FK with NOT NULL—
W020reserved word as identifier—
W021feature requires newer PostgreSQL version—
W022partition bound overlaps with sibling—

Info (I)

13 rules — suggestions for best practices.

Code Description Fixable
I001prefer text over char(n)Yes
I003prefer numeric over moneyYes
I004prefer identity over serialYes
I005prefer timestamptzYes
I006timetz is rarely usefulYes
I007prefer triggers over rules—
I009prefer jsonb over jsonYes
I012text/varchar PK—
I013too many indexes (>10)—
I016index on boolean column—
I017PK column does not follow <singularTable>Id convention—
I018table name does not match plural/singular convention—
I019partitioned table has more than 100 partitions—