Re: Moving a table to a different schema - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: Moving a table to a different schema
Date
Msg-id 20030529222316.GW40542@flake.decibel.org
Whole thread Raw
In response to Re: Moving a table to a different schema  (Andrew Sullivan <andrew@libertyrms.info>)
Responses Re: Moving a table to a different schema  (Steve Lane <slane@moyergroup.com>)
List pgsql-general
Well, that would *copy* the table... I just want to *move* it. :)

On Thu, May 29, 2003 at 02:31:04PM -0400, Andrew Sullivan wrote:
> On Thu, May 29, 2003 at 11:14:22AM -0500, Jim C. Nasby wrote:
> > Is there a command to move an existing table to a different schema?
>
>     CREATE TABLE targetschem.tablename AS
>         SELECT * FROM sourceschem.tablename
>
> would work.
>
> A
>
> --
> ----
> Andrew Sullivan                         204-4141 Yonge Street
> Liberty RMS                           Toronto, Ontario Canada
> <andrew@libertyrms.info>                              M2P 2A8
>                                          +1 416 646 3304 x110
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: "Jay O'Connor"
Date:
Subject: Re: PLPGSQL problem with SELECT INTO
Next
From: "Patrick Hatcher"
Date:
Subject: How to query multiple dbases efficiently?