RefLib

Reference library for AI

Back

postgresql_16:7.1.83.3 Notes

PostgreSQL 16 > Reference > SQL Commands > CREATE TABLE > Notes

PostgreSQL automatically creates an index for each unique constraint and primary key constraint to enforce uniqueness. Thus, it is not necessary to create an index explicitly for primary key columns. (See (see postgresql_16:7.1.67) for more information.)

Unique constraints and primary keys are not inherited in the current implementation. This makes the combination of inheritance and unique constraints rather dysfunctional.

A table cannot have more than 1600 columns. (In practice, the effective limit is usually lower because of tuple-length constraints.)

Back