Skip site navigation (1) Skip section navigation (2)

Re: Weeding out unused user created database objects, could I use pg_catalog?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Allan Kamau <kamauallan(at)gmail(dot)com>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Weeding out unused user created database objects, could I use pg_catalog?
Date: 2010-02-12 12:47:24
Message-ID: 4B754DDC.2060006@archonet.com (view raw or flat)
Thread:
Lists: pgsql-general
On 12/02/10 12:32, Allan Kamau wrote:
> If I start with a clean deployment, is there a way I could perhaps
> query the table(s) in pg_catalog for example to find out the database
> objects (I have constructed) that have been invoked or used in some
> way during a complete run of my application. I had a quick look at the
> pg_catalog but was unable to determine the tables that may contain
> pieces of this information. If pg_catalog could provide me with this
> solution, what are the table(s) to query?

Quickest solution might be to use the --list option of pg_restore 
(you'll need -Fc on pg_dump too). That will list everything in the 
database dump and you can just compare the lists.

-- 
   Richard Huxton
   Archonet Ltd

In response to

Responses

pgsql-general by date

Next:From: Igor NeymanDate: 2010-02-12 13:45:53
Subject: Re: help with SQL join
Previous:From: A. KretschmerDate: 2010-02-12 12:40:34
Subject: possible bug with inheritance?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group