Copy table to table

From: "Suresh Gupta VG" <suresh(dot)g(at)zensar(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>, <pgsql-admin-owner(at)postgresql(dot)org>
Subject: Copy table to table
Date: 2008-05-23 08:16:03
Message-ID: 3D5445983859B84B92669C0D883EA6FB0DB9E09F@ZENMAILHQ1.ind.zensar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)g(at)zensar(dot)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.

Browse pgsql-admin by date

  From Date Subject
Next Message Graeme Gould 2008-05-23 11:32:37 pgpass.conf
Previous Message Amit jain 2008-05-23 06:13:12 Re: Error while executing pg_dump "invalid memory alloc request size 4294967293"