Re: information_schema.constraint_column_usage shows wrong table name
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: information_schema.constraint_column_usage shows wrong table name |
| Дата | |
| Msg-id | 3788089.1628610683@sss.pgh.pa.us обсуждение |
| Ответ на | information_schema.constraint_column_usage shows wrong table name (Alex Zeng <Alex.Zeng@datam.co.nz>) |
| Список | pgsql-bugs |
Alex Zeng <Alex.Zeng@datam.co.nz> writes:
> When creating a constraint from table A to table B, the table name and column name in
information_schema.constraint_column_usage shows table B. That makes impossible to check whether a constraint exists as
wecan have a constraint from table C to B and they will have same value in information_schema.constraint_column_usage.
The SQL standard says the purpose of this view is to
Identify the columns used by referential constraints, unique
constraints, check constraints, and assertions defined in this catalog
and owned by a given user or role.
so I think the view is showing the column name it is supposed to,
ie the referenced column name not the referencing column name.
The key_column_usage view might help you with the other thing.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера