Project

General

Profile

Feature #803

Search For A Specific String In All Tables With PostgreSQL

Added by Daniel Curtis almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database Server
Target version:
Start date:
04/27/2016
Due date:
% Done:

100%

Estimated time:
0.10 h
Spent time:

Description

I recently needed to find all instances of a string in every table of a database with PostgreSQL. This is a simple process of how I did this.

  • Dump a temporary copy of the database:
    su - pgsql
    pg_dump --data-only --inserts exampledb > exampledb.psql
  • Then grep through the dumped database file looking for the string "someString"
    grep someString exampledb.psql
    

Resources

#1

Updated by Daniel Curtis almost 8 years ago

  • Subject changed from Search For A Specific String In All tables With PostgreSQL to Search For A Specific String In All Tables With PostgreSQL
  • Status changed from New to Resolved
  • % Done changed from 0 to 100
#2

Updated by Daniel Curtis almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF