Project

General

Profile

Actions

Feature #803

closed
DC DC

Search For A Specific String In All Tables With PostgreSQL

Feature #803: Search For A Specific String In All Tables With PostgreSQL

Added by Daniel Curtis over 9 years ago. Updated over 9 years ago.

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

100%

Estimated time:
0:06 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

DC Updated by Daniel Curtis over 9 years ago Actions #1

  • 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

DC Updated by Daniel Curtis over 9 years ago Actions #2

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom