Dropping Sequences headache

When you go thru regular database maintenance you might need to drop some objects. In some cases this objects have dependencies, this is the case of Sequences. So this is the error you get when you try to drop a sequence and that sequences is used in some tables definition.

  [Vertica][VJDBC](3128) ROLLBACK: DROP failed due to dependencies
  [Vertica][VJDBC]Detail: Cannot drop Sequence my_Seq because other objects depend on it
So you need and hunt for the tables that use them and see if the tables really use them :
  • this happens a lot after a migration of when a developing project is done , etc...
select * from columns where column_default ilike '%nextval%<schema of the sequence%';
After you remove the sequences from the default values or drop the table. You can go ahead and drop the sequence with no problem.