Re: making a copy of a table within the same database - Mailing list pgsql-general

From Karl O. Pinc
Subject Re: making a copy of a table within the same database
Date
Msg-id 20040303092259.C12220@mofo.meme.com
Whole thread Raw
In response to making a copy of a table within the same database  ("Sally Sally" <dedeb17@hotmail.com>)
Responses Re: making a copy of a table within the same database
List pgsql-general
On 2004.03.03 09:00 Sally Sally wrote:
> I wanted to dump the contents of one table to another (with a
> different name) within the same database. I am looking at pg_restore
> and it doesn't seem to have the option of specifying the name of the
> table we want to dump to, only the name we want to dump from. Does
> this mean I have to create the table and do an sql statement to copy
> the table? Is this the best way?

You might want to look at SELECT INTO ... .

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

pgsql-general by date:

Previous
From: Nick Barr
Date:
Subject: Re: How index are running and how to optimise ?
Next
From: Mike Mascari
Date:
Subject: Re: making a copy of a table within the same database