Vad sägs om att dumpa innehållet i databasen och sedan använda 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');
Samma verktyg, pg_dump, kan inkludera kolumnnamn i utdata. Ändra bara --inserts till --column-inserts . På så sätt kan du också söka efter specifika kolumnnamn. Men om jag letade efter kolumnnamn skulle jag förmodligen dumpa schemat istället för data.
$ pg_dump --data-only --column-inserts -U postgres your-db-name > a.tmp
$ grep country_code a.tmp
INSERT INTO countries (iso_country_code, iso_country_name) VALUES ('US', 'United States');
INSERT INTO countries (iso_country_code, iso_country_name) VALUES ('GB', 'United Kingdom');