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
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