pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddrop table failed to drop associated sequence
2+ messages / 2 participants
[nested] [flat]
* drop table failed to drop associated sequence
@ 2002-06-03 15:59 Juan Rojas <j.rojas@tiba.com>
0 siblings, 1 reply; 2+ messages in thread
From: Juan Rojas @ 2002-06-03 15:59 UTC (permalink / raw)
To: pgsql-admin
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.
If somebody has the same same problem, or has the solution, please tell me.
Best regards,
Juan
________________________________________
Juan Rojas
mailto: j.rojas@tiba.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: drop table failed to drop associated sequence
@ 2002-06-03 16:40 Henry House <hajhouse@houseag.com>
parent: Juan Rojas <j.rojas@tiba.com>
0 siblings, 0 replies; 2+ messages in thread
From: Henry House @ 2002-06-03 16:40 UTC (permalink / raw)
To: Juan Rojas <j.rojas@tiba.com>; +Cc: 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;.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-06-03 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-03 15:59 drop table failed to drop associated sequence Juan Rojas <j.rojas@tiba.com>
2002-06-03 16:40 ` Henry House <hajhouse@houseag.com>
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