Re: Bug #581: Sequence cannot be deleted
От | Tom Lane |
---|---|
Тема | Re: Bug #581: Sequence cannot be deleted |
Дата | |
Msg-id | 18876.1013480239@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Bug #581: Sequence cannot be deleted (pgsql-bugs@postgresql.org) |
Список | pgsql-bugs |
pgsql-bugs@postgresql.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
В списке pgsql-bugs по дате отправления: