Re: issue about information_schema REFERENTIAL_CONSTRAINTS
От | Tom Lane |
---|---|
Тема | Re: issue about information_schema REFERENTIAL_CONSTRAINTS |
Дата | |
Msg-id | 2683.1283266019@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | issue about information_schema REFERENTIAL_CONSTRAINTS (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Re: issue about information_schema REFERENTIAL_CONSTRAINTS |
Список | pgsql-bugs |
Fabien COELHO <coelho@cri.ensmp.fr> writes: > The REFERENTIAL_CONSTRAINTS table in the information_schema references a > constaint through its database/schema/name, but this information is not > unique, so it may identify several constraints, thus the information > derived may not be consistent. Postgres does not enforce that constraints have unique names within a schema. The SQL spec does say that they should be unique per-schema, and the information_schema views are designed on that assumption. If you use spec-compliant names for your constraints, you won't have a problem. If you don't, well, the information_schema views will be of limited use to you. > Suggestion: constraint names could be systematically prefixed with their > corresponding table so that they are indeed unique, We are not going to try to enforce uniqueness. This has been debated before, and most people like the current behavior just fine, or at least better than the alternatives. regards, tom lane
В списке pgsql-bugs по дате отправления: