Query to find Foreign Key column data type mismatch

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Query to find Foreign Key column data type mismatch
Дата
Msg-id 65937bea0905312336x20623976jcc64d144cb547d5d@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi All,

    I wanted to find out if both the ends of a foreign key reference were using the same data types, since, in older versions, not having the same data types can lead to Postgres not picking the appropriate index, and in newer versions also it would be beneficial since having same data types can avoid having to go through conversion functions for comparisons etc.

    So I devised this query and the helper function for the purpose. Just create the function and then run the query. This query checks all the foreign keys in the database.

    Feedback/comments welcome.

Best regards,
--
Lets call it Postgres

EnterpriseDB      http://www.enterprisedb.com

gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
Mail sent from my BlackLaptop device
Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: j-lists
Дата:
Сообщение: Foreign key verification trigger conditions
Следующее
От: Andrew Smith
Дата:
Сообщение: Re: newbie table design question