Re: how can i change my table/column constraint - Mailing list pgsql-general

From Muhammad Rusydi
Subject Re: how can i change my table/column constraint
Date
Msg-id 003701c0d53c$16167b20$1102a8c0@windows
Whole thread Raw
In response to how can i change my table/column constraint  ("Muhammad Rusydi" <rusydi@cbn.net.id>)
List pgsql-general
Hi Anand,

> basically copy the table to some other table..
> Drop the old table..
> recreate it with the constraints changed
> Repopulate the table..
would you show me with my two tables?
is it like this?
> >if i create another table named lab2 with same fields and then i move
> >all tuples from lab to lab2, then drop table lab and rename lab2 to
> >lab, is the references constraint in table tb2 still valid?
> >would you show me how to do this?
i create lab2 with the same constraint before i delete lab?
isn't it?
after lab2 created i copy all tuples from lab to lab2...
is it right?
what do you repopulate?
sorry...i'm still not getting on to it
TIA
Didi


pgsql-general by date:

Previous
From: Anand Raman
Date:
Subject: Re: how can i change my table/column constraint
Next
From: "Eric G. Miller"
Date:
Subject: Re: how can i change my table/column constraint