Search Postgresql Archives

Re: Unable to drop a table due to seemingly non-existent dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Brain <dbrain@xxxxxxxxxxxxx> writes:
> I have a situation where trying to drop a table results in:

> #drop table cdrimporterror_old;
> NOTICE:  default for table cdrimporterror column cdrimporterrorid
> depends on sequence cdrimporterror_cdrimporterrorid_seq
> ERROR:  cannot drop table cdrimporterror_old because other objects depend on it
> HINT:  Use DROP ... CASCADE to drop the dependent objects too.

> Now as you can probably imply from the name if this table, this table
> has been renamed from cdrimporterror to cdrimporterorr_old and I have
> (or at least thought I had) removed it's dependency on the sequence by
> changing the tables column type (from bigserial to bingint) and
> removing the default value.

The "ownership" link is still there, evidently, and should be switched
to the new table.  Read up on ALTER SEQUENCE OWNED BY.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux