Re: Bug #581: Sequence cannot be deleted

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nbazin(at)ingenico(dot)com(dot)au, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #581: Sequence cannot be deleted
Date: 2002-02-12 02:17:19
Message-ID: 18876.1013480239@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

pgsql-bugs(at)postgresql(dot)org writes:
> A Sequence is created automatically with the SQL command:
> CREATE TABLE fa_ccpsholderscpt(hsc_serial SERIAL NOT NULL ,chd_serial INTEGER NOT NULL ,hsc_respcode CHAR(2) NOT NULL ,scp_code CHAR(4) NOT NULL ,imp_flag SMALLINT)

Okay, let's try it ...

regression=# CREATE TABLE fa_ccpsholderscpt(hsc_serial SERIAL NOT NULL ,chd_serial INTEGER NOT NULL ,hsc_respcode CHAR(2) NOT NULL ,scp_code CHAR(4) NOT NULL ,imp_flag SMALLINT);
NOTICE: CREATE TABLE will create implicit sequence 'fa_ccpsholderscp_hsc_serial_seq' for SERIAL column 'fa_ccpsholderscpt.hsc_serial'
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'fa_ccpsholderscp_hsc_serial_key' for table 'fa_ccpsholderscpt'
CREATE

> but when I try to delete it with the following command:
> DROP SEQUENCE fa_ccpsholderscpt_hsc_serial_seq
> I get this error:
> sequence "fa_ccpsholderscpt_hsc_serial_se" does not exist

Not surprising, because that's not what it's called. Check the NOTICE
again.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-02-12 18:55:11 Bug #583: Wrong example in 7.2 Tutorial
Previous Message Stephan Szabo 2002-02-12 02:14:31 Re: Bug #581: Sequence cannot be deleted

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-02-12 02:23:03 Re: Optimizer(?) off by factor of 3 ... ?
Previous Message Tom Lane 2002-02-12 02:15:12 Re: Optimizer(?) off by factor of 3 ... ?