Thread: drop table and cleanups

drop table and cleanups

From
"Birchall, Austen"
Date:

Hi

 

If I drop a table am I right to assume that all its indexes, sequences etc. will also be dropped and that all entries in pg_class, pg_constraint, etc. will be cleaned up?

 

Thanks

 

Austen

 

Austen Birchall  Senior Database Administrator
Met Office
FitzRoy Road Exeter EX1 3PB United Kingdom

 

Re: drop table and cleanups

From
Josh Kupershmidt
Date:
On Mon, Nov 19, 2012 at 8:28 AM, Birchall, Austen
<austen.birchall@metoffice.gov.uk> wrote:
> If I drop a table am I right to assume that all its indexes, sequences etc.
> will also be dropped and that all entries in pg_class, pg_constraint, etc.
> will be cleaned up?

Yes. Check out pg_depend if you're interested in the bookkeeping
behind this dependency tracking:
  http://www.postgresql.org/docs/current/static/catalog-pg-depend.html

Josh