Thread: dropping a column from a table

dropping a column from a table

From
Melanie Renee Nelson
Date:
I have been following the discussion about dropping a column with
interest, because I ran into this problem just last week. The table I
wanted to alter is very central in my database, and therefore has a lot of
foreign key triggers defined on it. Am I correct that the method suggested
in the FAQ would cause any triggers defined on the table to be altered to
be lost (due to the DROP TABLE portion)? I was afraid this would be the
case, and didn't want to have to redefine all those triggers, so I didn't
use this method. My database is still young, and it doesn't have any user
defined rules or views or any of the other thing pg_dump can't handle, so
I just dumped my database, altered the resulting output file to make the
changes I wanted in my table, and then recreated my database.

Are there any hidden dangers in this method (besides the obvious ones due
to the limitations of pg_dump as spelled out in the man pages)?

Thanks
--Melanie

************************************************************************
Melanie Nelson                        mnelson@scripps.edu
Graduate Student                      http://www.scripps.edu/~mnelson
The Scripps Research Institute        (619) 784-9879
************************************************************************