Re: drop table cascade doesn't drop manual sequences - Mailing list pgsql-general

From Andreas Kretschmer
Subject Re: drop table cascade doesn't drop manual sequences
Date
Msg-id 20071014191911.GA11862@KanotixBox
Whole thread Raw
In response to Re: drop table cascade doesn't drop manual sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: drop table cascade doesn't drop manual sequences
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> schrieb:

> "Scott Marlowe" <scott.marlowe@gmail.com> writes:
> > On 10/10/07, Guilherme <antoniolo@gmail.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°

pgsql-general by date:

Previous
From: "Martin Gainty"
Date:
Subject: Re: can I define own variables?
Next
From: Tom Lane
Date:
Subject: Re: drop table cascade doesn't drop manual sequences