Re: [HACKERS] DROPping tables with SERIALs

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: j(dot)iven(at)rz(dot)uni-sb(dot)de (Jan Iven)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] DROPping tables with SERIALs
Date: 1998-12-13 03:49:23
Message-ID: 199812130349.WAA13066@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Hi,
>
> I have run into a problem dropping and re-creating tables with
> type SERIAL:
>
> CREATE TABLE t ( s SERIAL);
> DROP TABLE t;
> CREATE TABLE t ( s SERIAL);
>
> gives
> ERROR: t_s_seq relation already exists
>
> This looks like the implicitly created sequence t_s_seq is not dropped
> together with the table.
>
> I am running a current (?) cvs snapshot from anoncvs(at)postgresql(dot)org(dot)

Added to TODO:

* auto-destroy sequence on SERIAL removal

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-12-13 03:55:27 Re: [HACKERS] ecpg man page
Previous Message Bruce Momjian 1998-12-13 03:45:27 Re: [HACKERS] Re: memory leak with Abort Transaction