Search columns in Postgres

Posted on Aug 25, 2020

featured image

A simple query to search columns in different schemas

SELECT t.table_schema, t.table_name
FROM information_schema.tables t
INNER JOIN information_schema.columns c ON c.table_name = t.table_name and c.table_schema = t.table_schema
WHERE c.column_name = 'my_column'
AND t.table_schema IN ('pg_catalog', 'another_schema')
ORDER BY t.table_schema;

postgres sql dev
Side Widget
You can put anything you want inside of these side widgets. They are easy to use, and feature the new Bootstrap 4 card containers!