Re: List all columns referencing an FK

2018-04-09 Thread Peter Eisentraut
On 2/8/18 05:31, Andreas Joseph Krogh wrote: > Back in 2008 I asked this > question:  > http://www.postgresql-archive.org/Finding-all-tables-that-have-foreign-keys-referencing-a-table-td2153236.html > I wonder, is this now possible using information_schema only, or are > there still pieces missing

List all columns referencing an FK

2018-02-08 Thread Andreas Joseph Krogh
Hi all.   Back in 2008 I asked this question:  http://www.postgresql-archive.org/Finding-all-tables-that-have-foreign-keys-referencing-a-table-td2153236.html   The solution was (and still is) this: select confrelid::regclass, af.attname as fcol, conrelid::regclass, a.attname ascol from pg_attribu