Hi,
As a follow-up to my earlier post (Re: [postgis-users] schemas and postgis
data) I have another question.
I had originally put all my data into the public schema. I want to move my
geodata to the schema "data", so I just used to following command in the
pgadmin3 sql editor
create table data.new_table as (select * from public.old_table);
although this works, the schema is not copied..ie the primary key and other
contraints are missing.
So i have done this
# first create new table and copy schema
create table data.table_2(like table_1 including defaults including constraints
including indexes);
#then copy data into table_2
insert into data.table2(select * from public.table_1);
Is there a better/quicker/safer way of doing this? possibly with pgadmin3?
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users