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

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

From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Weeding out unused user created database objects, could I use pg_catalog?
Date: 2010-02-12 12:32:03
Message-ID: ab1ea6541002120432pf0e099dv3ced6f20b34e1e83@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

I have been written several psql functions, tiggers and defined
several tables over time for a database application I have been
developing. The application has evolved as I have gained better
understanding of the solution and so I have written newer psql
functions and other database objects inline with this evolution and
stopped calling (making use of) the older database objects I had
previously written. Now I would like to only keep these database
objects that are currently been used by the application. I have
dedicted a single database object for use with this application, and I
have all the DDL scripts in files which I execute for a clean
deployment.

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?


Allan.

Responses

pgsql-general by date

Next:From: A. KretschmerDate: 2010-02-12 12:40:34
Subject: possible bug with inheritance?
Previous:From: Oliver Kohll - Mailing ListsDate: 2010-02-12 12:29:49
Subject: pg_dump: SQL command failed

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