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

Moving tables between schemas

From: "m(dot)e(dot)bruche(at)lse(dot)ac(dot)uk" <m(dot)e(dot)bruche(at)lse(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Moving tables between schemas
Date: 2004-07-30 10:26:58
Message-ID: 1091183218.7080.14.camel@localhost (view raw or flat)
Thread:
Lists: pgsql-general
 
Hi,

In my database, I created a lot of tables before I found out about
schemas. It's a mess!

Suppose I want to get organised, and create a couple of schemas. How do
I move existing tables into my newly created schemas?

e.g.

public.table1 -> mynewschema1.table1
public.table2 -> mynewschema2.table2

?

Thanks.

Max


Responses

pgsql-general by date

Next:From: John Sidney-WoollettDate: 2004-07-30 10:42:58
Subject: Re: Moving tables between schemas
Previous:From: John Sidney-WoollettDate: 2004-07-30 10:19:55
Subject: Re: Moving tables between schemas

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