Re: how to show foreign keys of a table

Поиск
Список
Период
Сортировка
От Dominic J. Eidson
Тема Re: how to show foreign keys of a table
Дата
Msg-id Pine.LNX.4.21.0012302332030.15526-100000@morannon.the-infinite.org
обсуждение исходный текст
Ответ на Re: how to show foreign keys of a table  (GH <grasshacker@over-yonder.net>)
Список pgsql-general
On Sat, 30 Dec 2000, GH wrote:

> > Er, it smells like that only shows triggers, rather than foreign key
> > constraints. Correct?
>
> Ah hell, foreign keys constraints are triggers, right?

To quote Mike's email:

Date: Mon, 4 Dec 2000 23:28:32 -0500 (EST)
From: Michael Fork <mfork@toledolink.com>
To: pgsql-hackers@postgresql.org
Subject: RE: [HACKERS] SQL to retrieve FK's, Update/Delete action,
etc. (fwd)

There ya go, I figured it out :)  Given the name a table, this query will
return all foreign keys in that table, the table the primary key is in,
the name of the primary key, if the are deferrable, if the are initially
deffered, and the action to be performed (RESTRICT, SET NULL, etc.).  To
get the foreign keys and primary keys and tables, you must parse the
null-terminated pg.tgargs.


Good night :)

--
Dominic J. Eidson
                                        "Baruk Khazad! Khazad ai-menu!" - Gimli
-------------------------------------------------------------------------------
http://www.the-infinite.org/              http://www.the-infinite.org/~dominic/


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

Предыдущее
От: GH
Дата:
Сообщение: Re: how to show foreign keys of a table
Следующее
От: "Eric Mueller"
Дата:
Сообщение: detailed docs for functions