Copy table to table - Mailing list pgsql-admin

From Suresh Gupta VG
Subject Copy table to table
Date
Msg-id 3D5445983859B84B92669C0D883EA6FB0DB9E09F@ZENMAILHQ1.ind.zensar.com
Whole thread Raw
List pgsql-admin

Hi List,

 

I want to create a new table with the data and constraints as it is from existing table. I could create a new table with the existing table data as “ create table test2 as select * from test1; “. Here the constraints are not copying. Can any one please show me the way. 

 

Regards,

G. V. Suresh Gupta

---------------------------------------------------------------------------------------------------------------------------------

Innovative Technology Solutions(ITS), Zensar Technologies

Zensar Knowledge Park, Plot#5, MIDC IT Tower,

Kharadi, Off Nagar Road, Pune – 411014

Landline :  +91-20-66453471           | +91-9890898688                

Email     :   suresh.g@zensar.com    | website:  www.zensar.com

 

 

DISCLAIMER:
This email may contain confidential or privileged information for the intended recipient(s) and the views expressed in the same are not necessarily the views of Zensar Technologies Ltd. If you are not the intended recipient or have received this e-mail by error, its use is strictly prohibited, please delete the e-mail and notify the sender. Zensar Technologies Ltd. does not accept any liability for virus infected mails.

pgsql-admin by date:

Previous
From: "Amit jain"
Date:
Subject: Re: Error while executing pg_dump "invalid memory alloc request size 4294967293"
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: [HACKERS] Error while executing pg_dump "invalid memory alloc request size 4294967293"