How to search a specific value in all tables (PostgreSQL)?
How about dumping the contents of the database, then using grep? $ pg_dump –data-only –inserts -U postgres your-db-name > a.tmp $ grep United a.tmp INSERT INTO countries VALUES (‘US’, ‘United States’); INSERT INTO countries VALUES (‘GB’, ‘United Kingdom’); The same utility, pg_dump, can include column names in the output. Just change –inserts to –column-inserts. That … Read more