Re: invisible dependencies on a table?

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: invisible dependencies on a table?
Дата
Msg-id 1386909536815-5783254.post@n5.nabble.com
обсуждение исходный текст
Ответ на invisible dependencies on a table?  (Tim Uckun <timuckun@gmail.com>)
Ответы Re: invisible dependencies on a table?  (Tim Uckun <timuckun@gmail.com>)
Список pgsql-general
Tim Uckun wrote
> How can I drop this table and leave the sequence alone? Obviously the
> newly
> created table needs it.

<not tested>

You cannot.  You need to put the sequence up for adoption and have the "new"
table become its parent/owner.

http://www.postgresql.org/docs/9.2/interactive/sql-altersequence.html

ALTER SEQUENCE ... OWNED BY ... ;

I cannot readily speak to why you are not seeing sequence ownership as a
dependent when looking at the now-archive table definition.

Dropping the "systemevents_pkey" solved nothing (the PK constraint is part
of the table definition and furthermore has nothing to do with the sequence)
and really you wouldn't have to "drop default" either since all you are
doing is removing a dependency that the sequence has on the table: i.e., you
cannot drop the sequence until you drop the default - not the other way
around.

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/invisible-dependencies-on-a-table-tp5783252p5783254.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


В списке pgsql-general по дате отправления:

Предыдущее
От: Tim Uckun
Дата:
Сообщение: invisible dependencies on a table?
Следующее
От: Dev Kumkar
Дата:
Сообщение: Re: Case sensitivity