Erik Price <eprice@ptc.com> writes:
> But when I try to drop the sequence altogether:
> be_db=# DROP SEQUENCE news_news_id_seq;
> ERROR: Cannot drop sequence news_news_id_seq because table news column
> news_id requires it
That's intentional: the sequence is part of the implementation of a
serial column, and you should not be able to remove it separately.
(You really shouldn't be able to dork with the column's DEFAULT
expression either, but we don't currently have a way to enforce that.)
> Anybody have a suggestion? I just want to remove these sequences from
> the database altogether. Am I going to have to drop the news_id column
> altogether?
If you are really intent on deconstructing the sequence mechanism for
this column, you could find and delete the pg_depend row that represents
the dependency. Details are left as an exercise for the student ...
regards, tom lane