SQL Query for Foreign constraint

Поиск
Список
Период
Сортировка
От Bhim Kumar
Тема SQL Query for Foreign constraint
Дата
Msg-id CADzfocdYDwD5Cdir8RvAAx68wFZyQfmEMUOqdDpszCTm0S-RGw@mail.gmail.com
обсуждение исходный текст
Ответы Re: SQL Query for Foreign constraint  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
Hi sir

Currently I am using following query on mysql :

* SHOW TABLES;   ---> To get list of table in a particular db.
* SELECT TABLE_NAME, CONSTRAINT_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME from information_schema.key_column_usage WHERE constraint_schema ='myDBName';
    --->  to get foreign constraint information.
* SHOW INDEX FROM myTableName FROM myDBName;

I am required to get above information from postgres.

I didn't find postgres query corresponding to above mysql query to fetch corresponding information.

PS : help me for above query in postgres.

Best Regards.
Bhim

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

Предыдущее
От: Marc Brazeau
Дата:
Сообщение: pljava on postgres 9.3, mac & windows
Следующее
От: Granthana Biswas
Дата:
Сообщение: Dead rows not getting removed during vacuum