Обсуждение: psql: cannot run DISCARD ALL with AUTOCOMMIT = 'off'

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

psql: cannot run DISCARD ALL with AUTOCOMMIT = 'off'

От
Sergey Burladyan
Дата:
seb=> select version();
                                               version
------------------------------------------------------------------------------------------------------
 PostgreSQL 8.4.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.4-7) 4.4.4, 64-bit
(1 row)

Time: 0,074 ms
seb=> abort;
ROLLBACK
Time: 0,086 ms
seb=> DISCARD ALL ;
ERROR:  DISCARD ALL cannot run inside a transaction block

DISCARD is not mentioned anywhere in the src/bin/psql/common.c
in command_no_begin(const char *query) function.
I don't know, may be this is expected behavior.

--
Sergey Burladyan

Re: psql: cannot run DISCARD ALL with AUTOCOMMIT = 'off'

От
Itagaki Takahiro
Дата:
On Tue, Sep 28, 2010 at 12:41 PM, Sergey Burladyan <eshkinkot@gmail.com> wr=
ote:
> seb=3D> DISCARD ALL ;
> ERROR: =C2=A0DISCARD ALL cannot run inside a transaction block
>
> DISCARD is not mentioned anywhere in the src/bin/psql/common.c
> in command_no_begin(const char *query) function.

Thank you for the bug report!
Fixed and backpatched to 8.3.

--=20
Itagaki Takahiro