On Wed, Feb 02, 2005 at 02:58:35PM -0500, Tim Goodaire wrote:
> You can copy a table from one schema to another by doing something like
> this:
>
> SET search_path TO schema1,schema2;
This isn't necessary for the CREATE TABLE statement below since
you're already using schema-qualified table names. There might be
other reasons for doing so, however.
> CREATE TABLE schema2.mytable AS SELECT * FROM schema1.mytable;
Note that this copies only data -- you won't get constraints, default
values, indexes, triggers, rules, etc.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/