Re: drop table failed to drop associated sequence - Mailing list pgsql-admin

From Henry House
Subject Re: drop table failed to drop associated sequence
Date
Msg-id 20020603164044.GA17716@wotan.hajhouse.org
Whole thread Raw
In response to drop table failed to drop associated sequence  (Juan Rojas <j.rojas@tiba.com>)
List pgsql-admin
On Mon, Jun 03, 2002 at 12:59:27PM -0300, Juan Rojas wrote:
> Hi,
> I'm running PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96.
> I have a problem when I drop a table which contains a serial field. The
> system drops the table but the associated sequence still remains in the
> catalog, so if I want to create the table again with the same structure,
> CREATE TABLE throws an error because the sequence that it's trying to create
> already exists.

That's easy enough: just run a 'DROP SEQUENCE <sequence_name>' to remove the
sequence before re-creating the table. You may discover the name of the
sequence using '\ds' in psql.

--
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/pgp>
for information.  My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.

Attachment

pgsql-admin by date:

Previous
From: Juan Rojas
Date:
Subject: drop table failed to drop associated sequence
Next
From: "Nicolas Nolst"
Date:
Subject: performance issues with DBI module when data too big