Drop table abort

Started by Jackson, DeJuanover 26 years ago3 messages
#1Jackson, DeJuan
djackson@cpsgroup.com

It seem that a drop table while in a transaction keeps the table but not the
data. Bug? or undocumented feature?

testcase=> select * from t;
i
-
(0 rows)

testcase=> insert into t VALUES(1);
INSERT 551854 1
testcase=> insert into t VALUES(2);
INSERT 551855 1
testcase=> insert into t VALUES(3);
INSERT 551856 1
testcase=> select * from t;
i
-
1
2
3
(3 rows)

testcase=> begin;
BEGIN
testcase=> insert into t VALUES(4);
INSERT 551857 1
testcase=> drop table t;
DROP
testcase=> abort;
ABORT
testcase=> select * from t;
i
-
(0 rows)

testcase=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3

#2Bruce Momjian
maillist@candle.pha.pa.us
In reply to: Jackson, DeJuan (#1)
Re: [HACKERS] Drop table abort

It seem that a drop table while in a transaction keeps the table but not the
data. Bug? or undocumented feature?

testcase=> select * from t;
i
-
(0 rows)

testcase=> insert into t VALUES(1);
INSERT 551854 1
testcase=> insert into t VALUES(2);
INSERT 551855 1
testcase=> insert into t VALUES(3);
INSERT 551856 1
testcase=> select * from t;
i
-
1
2
3
(3 rows)

testcase=> begin;
BEGIN
testcase=> insert into t VALUES(4);
INSERT 551857 1
testcase=> drop table t;
DROP
testcase=> abort;
ABORT
testcase=> select * from t;
i
-
(0 rows)

testcase=> select version();
version

Known bug.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Jackson, DeJuan
djackson@cpsgroup.com
In reply to: Bruce Momjian (#2)
RE: [HACKERS] Drop table abort

Sorry for the duplicate mail. Been having problems with outgoing (just to
give you an idea about the kinds of problems: I sent this message over 24
hours ago).
DEJ

Show quoted text

-----Original Message-----
From: Jackson, DeJuan [SMTP:djackson@cpsgroup.com]
Sent: Monday, August 09, 1999 3:15 PM
To: PGSQL Hackers
Subject: [HACKERS] Drop table abort

It seem that a drop table while in a transaction keeps the table but not
the
data. Bug? or undocumented feature?

testcase=> select * from t;
i
-
(0 rows)

testcase=> insert into t VALUES(1);
INSERT 551854 1
testcase=> insert into t VALUES(2);
INSERT 551855 1
testcase=> insert into t VALUES(3);
INSERT 551856 1
testcase=> select * from t;
i
-
1
2
3
(3 rows)

testcase=> begin;
BEGIN
testcase=> insert into t VALUES(4);
INSERT 551857 1
testcase=> drop table t;
DROP
testcase=> abort;
ABORT
testcase=> select * from t;
i
-
(0 rows)

testcase=> select version();
version
--------------------------------------------------------------
PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3