Re: drop table cascade doesn't drop manual sequences

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: drop table cascade doesn't drop manual sequences
Date: 2007-10-14 19:19:12
Message-ID: 20071014191911.GA11862@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> schrieb:

> "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> writes:
> > On 10/10/07, Guilherme <antoniolo(at)gmail(dot)com> wrote:
> >> If I insert a sequence later on table creation with alter table, drop
> >> table cascade simply doesn't drop this sequence even when I specify
> >> CASCADE.
>
> > This is normal.
>
> 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...

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-10-14 19:39:30 Re: drop table cascade doesn't drop manual sequences
Previous Message Andreas 2007-10-14 17:30:51 Re: can I define own variables?