Re: Moving a table to a different schema

From: Steve Lane <slane(at)moyergroup(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Moving a table to a different schema
Date: 2003-05-30 04:31:24
Message-ID: BAFC48CC.2FCF3%slane@moyergroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/29/03 5:23 PM, "Jim C. Nasby" <jim(at)nasby(dot)net> wrote:

> 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

So perhaps finish with

DROP TABLE sourceschem.tablename ?

:>

-- sgl

=======================================================
Steve Lane

Vice President
The Moyer Group
14 North Peoria St Suite 2H
Chicago, IL 60607

Voice: (312) 433-2421 Email: slane(at)moyergroup(dot)com
Fax: (312) 850-3930 Web: http://www.moyergroup.com
=======================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message utomo restu 2003-05-30 05:00:17 help ?
Previous Message Bruno Wolff III 2003-05-30 02:29:13 Re: Join question