pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCannot drop sequence...
3+ messages / 3 participants
[nested] [flat]
* Cannot drop sequence...
@ 2001-05-16 20:26 D0 <jnielsen@aero-graphics.com>
0 siblings, 2 replies; 3+ messages in thread
From: D0 @ 2001-05-16 20:26 UTC (permalink / raw)
To: pgsql-admin
agi_db=# create table analytics_budget
agi_db-# (
agi_db(# analytics_budget_id serial not null primary key,
agi_db(# triangulation int2,
agi_db(# sales_order_id int4 not null references
sales_order(sales_order_id) default
atoi(currval('sales_order_sales_order_id'))
agi_db(# );
NOTICE: CREATE TABLE will create implicit sequence
'analytics_bud_analytics_bud_seq' for SERIAL column
'analytics_budget.analytics_budget_id'
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
'analytics_budget_pkey' for table 'analytics_budget'
NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
check(s)
ERROR: Relation 'analytics_bud_analytics_bud_seq' already exists
agi_db=# drop sequence analytics_bud_analytics_bud_seq;
ERROR: Relation 'analytics_bud_analytics_bud_seq' does not exist
agi_db=# drop sequence analytics_budget_analytics_budget_seq;
NOTICE: identifier "analytics_budget_analytics_budget_seq" will be
truncated to "analytics_budget_analytics_budg"
ERROR: Relation 'analytics_budget_analytics_budg' does not exist
So... How do I get rid of this sequence?
Also how do I get a listing of the sequences already created?
TIA
--
Jason Nielsen Aero-Graphics, Inc.
Computer Grunt (Systems Administrator) www.aero-graphics.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cannot drop sequence...
@ 2001-05-18 13:47 Serge Canizares <serge@enluminaire.com>
parent: D0 <jnielsen@aero-graphics.com>
1 sibling, 0 replies; 3+ messages in thread
From: Serge Canizares @ 2001-05-18 13:47 UTC (permalink / raw)
To: D0 <jnielsen@aero-graphics.com>; +Cc: pgsql-admin
> Also how do I get a listing of the sequences already created?
>
> TIA
\ds
You can always get a list of commands with \?, and help with \h.
Serge
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cannot drop sequence...
@ 2001-05-18 14:43 Tom Lane <tgl@sss.pgh.pa.us>
parent: D0 <jnielsen@aero-graphics.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2001-05-18 14:43 UTC (permalink / raw)
To: D0 <jnielsen@aero-graphics.com>; +Cc: pgsql-admin
D0 <jnielsen@aero-graphics.com> writes:
> ERROR: Relation 'analytics_bud_analytics_bud_seq' already exists
> agi_db=# drop sequence analytics_bud_analytics_bud_seq;
> ERROR: Relation 'analytics_bud_analytics_bud_seq' does not exist
What PG version are you running? This looks like the classic catch-22
from pre-7.1 versions wherein you tried to roll back a DROP operation.
The pg_class entry for the dropped sequence rolls back just fine, but
the physical file is already gone, leading to no end of confusion when
you try to manipulate the object later.
If that's what it is, you can resolve the inconsistency and make the
DROP possible with something like
touch $PGDATA/base/agi_db/analytics_bud_analytics_bud_seq
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-05-18 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-16 20:26 Cannot drop sequence... D0 <jnielsen@aero-graphics.com>
2001-05-18 13:47 ` Serge Canizares <serge@enluminaire.com>
2001-05-18 14:43 ` Tom Lane <tgl@sss.pgh.pa.us>
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