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.