Обсуждение: Unable to query information_schema.constraint_column_usage

Поиск
Список
Период
Сортировка

Unable to query information_schema.constraint_column_usage

От
Erwin Fritz
Дата:

Hello, all.

 

I’m trying to build a query that joins several information_schema views. The role I’m using has SELECT and USAGE permissions into the account whose tables I care about.

 

I connect as the role and run this:

 

select count(*) from information_schema.table_constraints;

count

-------

  1125

(1 row)

 

All good.

 

Now I run this:

 

select count(*) from information_schema.constraint_column_usage;

count

-------

     0

(1 row)

 

This view is missing data on several foreign key constraints that exist in the schema I care about. When I run these queries as ‘postgres’, they work fine (naturally).

 

What permissions do I need to grant the querying role so it can see the constraint columns belonging to another schema? Why does querying on the table_constraints view work, but on constraint_column_usage not work?

 

 

 

 

 

Erwin Fritz
IS Operations Manager
GLJ Petroleum Consultants
Tel:  +1 (403) 266-9570


This message is intended only for the recipient(s) to which it is addressed and may contain information that is privileged and confidential. If you have received this message in error, please notify the sender immediately and delete all copies.


Вложения