Re: How to easily spot Foreign keys
От | Stephan Szabo |
---|---|
Тема | Re: How to easily spot Foreign keys |
Дата | |
Msg-id | 20030813090712.P50295-100000@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | Re: How to easily spot Foreign keys (Harry Broomhall <harry.broomhall@uk.easynet.net>) |
Список | pgsql-novice |
On Wed, 13 Aug 2003, Harry Broomhall wrote: > Stephan Szabo writes: > > > > On Wed, 13 Aug 2003, Harry Broomhall wrote: > > > > > I am currently doing a bit of 'reverse engineering' and documenting > > > a set of tables. > > > > > > Using pgsql and the \d command produces info about most things, but > > > doesn't *obviously* produce foreign key or references info. > > > > I believe 7.3's \d should provide foreign key info (for constraints made > > in 7.3 or for which you've run adddepend from contrib if you've upgraded > > from 7.2). > > > Many thanks for your rapid reply. Unfortunately I am trying to > document some 7.2 based tables in advance of upgrading to 7.3! Ah... Hmm, the best documents I can think of relating to this are on techdocs.postgresql.org. The "Compensating for Unimplemented Features in PostgreSQL 7.1" article seems to have a script for generating ALTER TABLE ADD CONSTRAINT commands for foreign keys which may give you some of the info you want.
В списке pgsql-novice по дате отправления: