Statement cancel or transaction cancel? - Mailing list pgsql-general

From Qingqing Zhou
Subject Statement cancel or transaction cancel?
Date
Msg-id d0rnch$1kf4$1@news.hub.org
Whole thread Raw
Responses Re: Statement cancel or transaction cancel?  (Sean Davis <sdavis2@mail.nih.gov>)
List pgsql-general
Pg8.0.1

backend> begin;
backend> create table a (i int);
backend> insert into a values(1);
         1: i   (typeid = 23, len = 4, typmod = -1, byval = t)
        ----
backend> select * from pg_class;
         1: relname     (typeid = 19, len = 64, typmod = -1, byval = f)
         2: relnamespace        (typeid = 26, len = 4, typmod = -1, byval =
t)
         3: reltype     (typeid = 26, len = 4, typmod = -1, byval = t)
         4: relowner    (typeid = 23, len = 4, typmod = -1, byval = t)

... before the query is finished, press a ctrl_c here ...

ERROR:  canceling query due to user request
backend> select * from a;
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
backend> commit;
backend> select * from a;
ERROR:  relation "a" does not exist

So ctrl_c in a backend actually means cancel the whole transaction (instead
of statement)?


Thanks,
Qingqing




pgsql-general by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: New PostgreSQL RPMs are available for many platforms
Next
From: Karsten Hilbert
Date:
Subject: Re: partitionning