From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | <wsheldah(at)lexmark(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: alter table workaround |
Date: | 2001-10-31 16:27:10 |
Message-ID: | 20011031082518.L18528-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 31 Oct 2001 wsheldah(at)lexmark(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2001-10-31 16:32:54 | Re: serial sequence problem with existing keys |
Previous Message | Randall Perry | 2001-10-31 15:59:29 | serial sequence problem with existing keys |