This is a discussion on how to get fy info from the parent table within the pgsql Admins forums, part of the PostgreSQL category; --> Could some one tell me how to check this pk/fy thing please? From the parent table, I can see ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Could some one tell me how to check this pk/fy thing please? From the parent table, I can see only the primary key there, now I wan to know how many and what other foreign keys are referencing this primary key... did this check long time ago and totally forgot how I did it then.... Thanks a log, Jessica |
| ||||
| Στις Friday 04 July 2008 16:57:20 ο/η JessicaRichard *γραψε: > Could some one tell me how to check this pk/fy thing please? > smth like SELECT kid.relname as "KID",c.confrelid,c.conkey,c.confkey,f.relname as "DAD" FROM pg_catalog.pg_constraint c,pg_catalog.pg_class f,pg_catalog.pg_class kid WHERE c.contype = 'f' AND c.confrelid = f.oid AND c.conrelid=kid.oid AND f.relname='vessels'; could be your friend. substitute vessels with your "DAD" table, to find thekids. > >From the parent table, I can see only the primary key there, now I wan to know how many and what other foreign keys are referencing this primary key... did this check long time ago and totally forgot how I did it then.... > > Thanks a log, > Jessica > > > > -- Achilleas Mantzios -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin |