Re: how do I do to get the foreign keys of a table?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: how do I do to get the foreign keys of a table?
Дата
Msg-id 20021019092631.Q43125-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на how do I do to get the foreign keys of a table?  ("Roberto (SmartBit)" <roberto@smartbit.inf.br>)
Список pgsql-general
On Sat, 19 Oct 2002, Roberto (SmartBit) wrote:

> This is my SQL to return the constraints...
>
> select tgconstrname, tr.relname, fr.relname from pg_trigger, pg_class tr,
> pg_class fr
> where tr.oid = tgrelid and fr.oid = tgconstrrelid and
> tr.relname='MyTableName'
>
>  so, how do I do to get the  foreign keys of a table?
>
> let me be more explicite, I want to get the name of fields from a table that
> are related with other table! (foreign key)

You'll have to parse it out from tgargs.


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

Предыдущее
От: "Williams, Travis L, NPONS"
Дата:
Сообщение: Connection timeout..
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Connection timeout..