Re: drop table cascade doesn't drop manual sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: drop table cascade doesn't drop manual sequences
Дата
Msg-id 3360.1192390770@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: drop table cascade doesn't drop manual sequences  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-general
Andreas Kretschmer <akretschmer@spamfence.net> writes:
> Tom Lane <tgl@sss.pgh.pa.us> schrieb:
>> In 8.2 and up you can use ALTER SEQUENCE ... OWNED BY ... to establish a
>> link that will make a manually created sequence go away when its "owner"
>> column is dropped.  In 8.1 that aspect of SERIAL is hidden magic :-(

> Really no way to recognize with pg_* or information_schema.* ? I can't
> believe this, but i don't know a way...

Well, ALTER OWNED BY works by adding or removing a pg_depend entry, and
if you wanted to get down and dirty you could do that manually in
earlier releases.  I wouldn't recommend it though ...

            regards, tom lane

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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: drop table cascade doesn't drop manual sequences
Следующее
От: Geoffrey
Дата:
Сообщение: Re: reporting tools