From: | Ron St-Pierre <rstpierre(at)syscor(dot)com> |
---|---|
To: | Igor Kryltsov <kryltsov(at)yahoo(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to drop sequence? |
Date: | 2004-03-01 15:53:40 |
Message-ID: | 40435C84.4010401@syscor.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Igor Kryltsov wrote:
>Hi,
>
>I have table:
>
>
># \d category;
> category_id | integer | not null default
>nextval('public.category_category_id_seq'::text)
> category_name | character varying(100) | not null
>Indexes: category_pkey primary key btree (category_id)
>
>My goal is to remove sequence from category_id column and remove it after
>from DB.
>
>First I tried:
>
>DROP SEQUENCE category_category_id_seq - fails saying that table category
>column category_id uses it
>
>Than I tried:
>
>ALTER TABLE category ALTER COLUMN category_id DROP DEFAULT;
>
>Now category_id column is shown as integer not null only but :
>
>DROP SEQUENCE category_category_id_seq - fails saying that table category
>column category_id uses it again
>
>
>Any suggestions?
>
>Thank you,
>
>
>Igor
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>
>
Try
DROP SEQUENCE category_category_id_seq CASCADE;
Ron
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2004-03-01 15:54:43 | Re: efficient storing of urls |
Previous Message | Stephan Szabo | 2004-03-01 15:28:37 | Re: ORDER BY problem |