3

Are PostgreSQL 10.x identity columns inherently indexed? unique? Or do I need to add a (unique) index to the column as desired?

mwp
  • 133
  • 4

1 Answers1

3

Are PostgreSQL 10.x identity columns inherently indexed?

No

unique?

No

Or do I need to add a (unique) index to the column as desired?

You don't have to, if you desire it you can. Or just declare the IDENTITY COLUMN to be a PRIMARY KEY (as they're often used). All PRIMARY KEYs are UNIQUE and indexed.

See also

Evan Carroll
  • 63,051
  • 46
  • 242
  • 479