pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: VACUUM cannot be run in a transaction block
Date: Mon, 02 Sep 2013 14:31:20 +0300
Message-ID: <52247708.9030100@vmware.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hi,

If you try to run VACUUM with SQLPrepare/SQLExecute, and auto-commit is 
disabled, and UseServerSidePrepare=1 (which is now the default in git 
master), you get an error:

ERROR:  VACUUM cannot run inside a transaction block

There is some code in place to avoid this in UseServerSidePrepare=0 
mode. The driver looks at  the statement type (by looking at the first 
word of the statement) and skips the implicit BEGIN if it's a VACUUM or 
one of the other commands that cannot be run in a transaction block. 
However, the extended query protocol code path didn't do that.

I just pushed a fix for that, but I thought this warranted to be 
mentioned on the mailing list.

PS. Can we get 9.3 version packaged very soon? The server 9.3.0 server 
version will be wrapped today, and will be announced on Monday Sep 9th. 
We really should have a 9.3 labeled version of the driver available by then.

- Heikki


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



Message-ID: <52247708.9030100@vmware.com>
Permalink:  ../52247708.9030100@vmware.com/
Also on:    postgresql.org/message-id/52247708.9030100@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hlinnakangas@vmware.com
  Subject: Re: VACUUM cannot be run in a transaction block
  In-Reply-To: <52247708.9030100@vmware.com>
  References: <52247708.9030100@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox