Are PostgreSQL 10.x identity columns inherently indexed? unique? Or do I need to add a (unique) index to the column as desired?
Asked
Active
Viewed 85 times
1 Answers
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