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

Re: Replace Old Table with New

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Lebling" <dlebling(at)ucentric(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Replace Old Table with New
Date: 2001-09-20 06:45:58
Message-ID: 1684.1000968358@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
"David Lebling" <dlebling(at)ucentric(dot)com> writes:
> I investigated using 'alter table ... rename to ...' but it didn't seem to
> also rename the associated indexes, and before actually implementing code to
> do it I want to ask if that would actually work.

ALTER RENAME just changes the name of the given table.  If you want to
rename indexes, use ALTER RENAME to rename them, too.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Sheldon HearnDate: 2001-09-20 12:16:53
Subject: Re: VACUUM vs VACUUM ANALYZE vs CLUSTER
Previous:From: Tom LaneDate: 2001-09-20 03:37:56
Subject: Re: VACUUM vs VACUUM ANALYZE vs CLUSTER

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