| From: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Move table between schemas |
| Date: | 2004-11-16 22:09:37 |
| Message-ID: | 20041116220937.GA18023@phlogiston.dyndns.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Tue, Nov 16, 2004 at 02:30:09PM +0200, Achilleus Mantzios wrote:
> >
> > CREATE TABLE newschema.newtable AS SELECT * FROM oldschema.oldtable
> >
> > oughta work.
>
> What about indexes, constraints, sequences,etc...???
You'll have to create those too, I'm afraid. I don't know of a way
to move tables from one schema to another otherwise. You could do
all the dependencies with a pg_dump -t, I suspect. Not tested that,
though.
A
--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
--Alexander Hamilton
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2004-11-16 22:34:31 | Re: Counting Distinct Records |
| Previous Message | Pierre-Frédéric Caillaud | 2004-11-16 21:43:01 | Re: finding gaps in dates |