pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Henry House <hajhouse@houseag.com>
To: Juan Rojas <j.rojas@tiba.com>
Cc: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Re: drop table failed to drop associated sequence
Date: Mon, 3 Jun 2002 09:40:44 -0700
Message-ID: <20020603164044.GA17716@wotan.hajhouse.org> (raw)
In-Reply-To: <6D0F8E8EB31A634BB06697807A87942243061A@obiwan.lan.tiba.com>
References: <6D0F8E8EB31A634BB06697807A87942243061A@obiwan.lan.tiba.com>

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;.

view thread (2+ messages)

Message-ID: <20020603164044.GA17716@wotan.hajhouse.org>
Permalink:  ../20020603164044.GA17716@wotan.hajhouse.org/
Also on:    postgresql.org/message-id/20020603164044.GA17716@wotan.hajhouse.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: hajhouse@houseag.com, j.rojas@tiba.com
  Subject: Re: drop table failed to drop associated sequence
  In-Reply-To: <20020603164044.GA17716@wotan.hajhouse.org>
  References: <6D0F8E8EB31A634BB06697807A87942243061A@obiwan.lan.tiba.com> <20020603164044.GA17716@wotan.hajhouse.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox