Unable to query information_schema.constraint_column_usage

Поиск
Список
Период
Сортировка
От Erwin Fritz
Тема Unable to query information_schema.constraint_column_usage
Дата
Msg-id 9E6E27BCA0E8EE478089F158D73AF936A93C8718@Exch10-Mailbox.corp.gljpc.com
обсуждение исходный текст
Список pgsql-admin

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.


Вложения

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

Предыдущее
От: Rajni Baliyan
Дата:
Сообщение: Re: recovery.conf not getting changed to recovery.done after PITR
Следующее
От: Joao Ribeiro
Дата:
Сообщение: Schema's vs Single Database with prefix on tables