From: | Henry House <hajhouse(at)houseag(dot)com> |
---|---|
To: | Juan Rojas <j(dot)rojas(at)tiba(dot)com> |
Cc: | "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: drop table failed to drop associated sequence |
Date: | 2002-06-03 16:40:44 |
Message-ID: | 20020603164044.GA17716@wotan.hajhouse.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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>.
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolas Nolst | 2002-06-03 16:56:59 | performance issues with DBI module when data too big |
Previous Message | Juan Rojas | 2002-06-03 15:59:27 | drop table failed to drop associated sequence |