How to find a table having a specific column in postgresql
You can also do
select table_name from information_schema.columns where column_name = 'your_column_name'
you can query system catalogs:
select c.relnamefrom pg_class as c inner join pg_attribute as a on a.attrelid = c.oidwhere a.attname = <column name> and c.relkind = 'r'
I've used the query of @Roman Pekar as a base and added schema name (relevant in my case)
select n.nspname as schema ,c.relname from pg_class as c inner join pg_attribute as a on a.attrelid = c.oid inner join pg_namespace as n on c.relnamespace = n.oidwhere a.attname = 'id_number' and c.relkind = 'r'