Re: Foreign keys
От | Stephan Szabo |
---|---|
Тема | Re: Foreign keys |
Дата | |
Msg-id | Pine.BSF.4.21.0102191302560.84309-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Foreign keys (MMM <mamuma@eresmas.com>) |
Список | pgsql-general |
You can reconstruct the information out of the triggers that are created in pg_trigger. It's not easy to parse however. There are three triggers created for each fk constraint, one on the fk table, two on the pk table. You can get the tables, columns constrained and match type from the tgargs. The referential actions are determined by the function oids of the pk table triggers (do something like: select pg_proc.proname from pg_trigger,pg_proc where pg_trigger.tgfoid=pg_proc.oid; to get the function names which will look like: RI_FKey_<action>_(upd|del) for update or delete, <action> is the action defined. On Sat, 17 Feb 2001, MMM wrote: > Sorry for my bad English > > I'd like to know how I can see the foreign keys for a table. > > Is there a system table where I can do a Select?; > > Thank you. >
В списке pgsql-general по дате отправления: