Re: Moving a table to a different schema

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Andrew Sullivan <andrew(at)libertyrms(dot)info>, pgsql-general(at)postgresql(dot)org
Subject: Re: Moving a table to a different schema
Date: 2003-05-29 22:23:17
Message-ID: 20030529222316.GW40542@flake.decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)libertyrms(dot)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(at)nasby(dot)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?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jay O'Connor 2003-05-29 23:14:52 Re: PLPGSQL problem with SELECT INTO
Previous Message Jay O'Connor 2003-05-29 22:16:52 Re: PLPGSQL problem with SELECT INTO