Re: Bit by "commands ignored until end of transaction block" again
От
Thomas Kellerer
Тема
Re: Bit by "commands ignored until end of transaction block" again
Дата
Msg-id
h493ls$fd$1@ger.gmane.org
Ответ на
Список
Дерево обсуждения
Bit by "commands ignored until end of transaction block" again Glenn Maynard <glenn@zewt.org>
Re: Bit by "commands ignored until end of transaction block"
again Richard Huxton <dev@archonet.com>
Re: Bit by "commands ignored until end of transaction block"
again Glenn Maynard <glenn@zewt.org>
Re: Bit by "commands ignored until end of transaction block"
again Joshua Tolley <eggyknap@gmail.com>
Re: Bit by "commands ignored until end of transaction block"
again Alvaro Herrera <alvherre@commandprompt.com>
Re: Bit by "commands ignored until end of transaction block"
again Joshua Tolley <eggyknap@gmail.com>
Re: Bit by "commands ignored until end of transaction block"
again Chris <dmagick@gmail.com>
Re: Bit by "commands ignored until end of transaction block"
again Craig Ringer <craig@postnewspapers.com.au>
Re: Bit by "commands ignored until end of transaction block" again Thomas Kellerer <spam_eater@gmx.net>
Re: Bit by "commands ignored until end of transaction block"
again Stephen Frost <sfrost@snowman.net>
Re: Bit by "commands ignored until end of transaction block"
again Richard Huxton <dev@archonet.com>
Re: Bit by "commands ignored until end of transaction block"
again Glenn Maynard <glenn@zewt.org>
Re: Bit by "commands ignored until end of transaction block"
again Craig Ringer <craig@postnewspapers.com.au>
Re: Bit by "commands ignored until end of transaction block" again Adrian Klaver <aklaver@comcast.net>
Re: Bit by "commands ignored until end of transaction block"
again Richard Huxton <dev@archonet.com>
Re: Bit by "commands ignored until end of transaction block"
again Glenn Maynard <glenn@zewt.org>
Chris, 23.07.2009 09:06: > psql -d dbname > .. > # select now(); > now > ------------------------------- > 2009-07-23 17:04:21.406424+10 > (1 row) > > Time: 2.434 ms > (csmith@[local]:5432) 17:04:21 [test] > # savepoint xyz; > ERROR: SAVEPOINT can only be used in transaction blocks > (csmith@[local]:5432) 17:04:25 [test] > > You haven't explicitly started a transaction, therefore savepoints won't > work. > > Django (it seems) just issues queries with no knowledge of (and no way > to support) them. The above situation only arises if you run in autocommit mode which is the default for psql (which I have *never* understood). If you do a "\set AUTOCOMMIT off", then you can set a savepoint without using BEGIN. I have this in my psqlrc.conf and your example looks like this on my computer: c:\Temp>psql training thomas psql (8.4.0) Type "help" for help. training=> select now(); now ----------------------------2009-07-23 09:30:55.791+02 (1 row) training=> savepoint abc; SAVEPOINT training=> release abc; RELEASE training=> I don't believe any serious ORM would run in autocommit mode, so that shouldn't be a problem. Thomas
В списке pgsql-sql по дате отправления
От: Glenn Maynard
Дата: