From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: seq bug 2073 and time machine |
Date: | 2008-08-24 21:26:24 |
Message-ID: | 20080824212624.GB4506@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ivan Sergio Borgonovo wrote:
> I was trying to drop a serial.
> Dropped the default for a column.
> Now it seems I can't drop the sequence since I incurred in:
>
> http://archives.postgresql.org/pgsql-bugs/2005-11/msg00304.php
>
> Is there a way I can still delete the sequence without using a
> backup?
If you're feeling corageous, you can remove the pg_depend entries for
that sequence. Make sure to try it in a transaction and drop the
sequence in that same transaction, so that if you mess up the catalogs
too badly you can get out of it by rolling back.
In recent releases (I think 8.2 and beyond) you can use ALTER SEQUENCE
... OWNED BY to fix the problem without messing with the catalogs
directly. This is obviously recommended if available.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
From | Date | Subject | |
---|---|---|---|
Next Message | Brian Green | 2008-08-24 22:49:52 | Installing Postgress 8.3.3 |
Previous Message | Alvaro Herrera | 2008-08-24 21:22:12 | Re: psql \df+ [pattern] with overloaded functions |