Re: alter table workaround - Mailing list pgsql-general

From Stephan Szabo
Subject Re: alter table workaround
Date
Msg-id 20011031082518.L18528-100000@megazone23.bigpanda.com
Whole thread Raw
In response to alter table workaround  (wsheldah@lexmark.com)
Responses Re: alter table workaround  ("Aasmund Midttun Godal" <postgresql@envisity.com>)
List pgsql-general
On Wed, 31 Oct 2001 wsheldah@lexmark.com wrote:

> What I'm wondering is whether it would be safe to just dump the affected table
> with `pg_dump -t mytable mydb >mytable.sql`, and then in psql do:
> drop table mytable;
> drop sequence mysequence;
> \i mytable.sql
>
> ...after editing mytable.sql of course.  My goal here is to only drop and
> restore what I really need to.  Will this restore all affected triggers, etc.
> that are affected by the drop table command?  Any other caveats?

It depends.  If this table is referenced by other tables (for example)
I don't think that will re-add the constraint to the other table.  There
may be issues like that that you'd run into.



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: serial sequence problem with existing keys
Next
From: Randall Perry
Date:
Subject: Re: serial sequence problem with existing keys