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

Re: Move table between schemas

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 11:05:38
Message-ID: 20041116110538.GA15247@phlogiston.dyndns.org (view raw or flat)
Thread:
Lists: pgsql-sql
On Tue, Nov 16, 2004 at 10:02:34AM +0100, Markus Schaber wrote:
> Hello,
> 
> Is there an easy way to move a table to another schema in PostgreSQL 7.4?
> 
> ALTER TABLE and ALTER SCHEMA don't have this options.

CREATE TABLE newschema.newtable AS SELECT * FROM oldschema.oldtable 

oughta work.

A

-- 
Andrew Sullivan  | ajs(at)crankycanuck(dot)ca
When my information changes, I alter my conclusions.  What do you do sir?
		--attr. John Maynard Keynes

In response to

Responses

pgsql-sql by date

Next:From: Gary StainburnDate: 2004-11-16 11:29:46
Subject: tree structure photo gallery date quiery
Previous:From: Markus SchaberDate: 2004-11-16 09:02:34
Subject: Move table between schemas

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