Y
Hacker News
new
|
ask
|
show
|
jobs
by
srcreigh
610 days ago
It’s really annoying to see people write that Postgres has a “primary index” and “secondary indexes”. No. That’s not what those words mean. Every index in Postgres is a secondary index.
1 comments
sgarland
610 days ago
You’re not technically wrong, but even Postgres’ docs [0] use the term Primary Key.
[0]:
https://www.postgresql.org/docs/current/ddl-constraints.html
link
srcreigh
610 days ago
Postgres primary key indexes are not primary indexes.
link
sgarland
609 days ago
I know that, I’m saying that it’s a fairly pedantic argument when even their own docs use the term loosely.
link
jeltz
609 days ago
Primary keys are primary indexes are two mostly unrelated terms.
link
j16sdiz
609 days ago
"Primary Key" is the term in SQL standard. The url you linked is in "Part II: The SQL Language"
link
[0]: https://www.postgresql.org/docs/current/ddl-constraints.html