Обсуждение: DDL and transactions

Поиск
Список
Период
Сортировка

DDL and transactions

От
sad
Дата:
Why does a DDL command starts a transaction ?!

try
# set autommit=3Doff;
SET
# create table a (i int);
CREATE TABLE
# create table b (i int);
ERROR:  current transaction is aborted, queries ignored until end of=20
transaction block
# commit;
COMMIT
# create table b (i int);
CREATE TABLE
# \d
               List of relations
 Schema |      Name      |   Type    | Owner
----------+---------------+-----------+-------
 public   | a                  | table       | pgsql
 public   | b                  | sequence | pgsql

Dont you find curious a commiting of a DDL ?

Re: DDL and transactions

От
Tom Lane
Дата:
sad <sad@bankir.ru> writes:
> Dont you find curious a commiting of a DDL ?

Only to someone who's used to inferior databases that cannot roll back
DDL commands.

            regards, tom lane