mardi 18 novembre 2014

Why can't two tables have an index of the same name?


Vote count:

0




I'm creating indexes on two separate tables in the same DB (PostgreSQL), and I got an error saying that an index already exists. This was true, however, the index existed on a different table. After changing the name, it worked.


I'm wondering why this is the case? Why are databases designed such that two tables can't have the same name of an index?


I found two sources that answer this, although the answers are different. One is for MySQL, the other is for Postgres:


In postgres how do I add index to existing table?


Same index name for two tables



asked 1 min ago







Why can't two tables have an index of the same name?

Aucun commentaire:

Enregistrer un commentaire