patternsqlMinor
Are PostgreSQL 10.x identity columns inherently indexed? unique?
Viewed 0 times
postgresqluniqueidentitycolumnsareinherentlyindexed
Problem
Are PostgreSQL 10.x identity columns inherently indexed? unique? Or do I need to add a (unique) index to the column as desired?
Solution
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
See also
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
- What are Identity Columns?
Context
StackExchange Database Administrators Q#204376, answer score: 3
Revisions (0)
No revisions yet.