Re: Fix for VACUUM in psql autocommit off - Mailing list pgsql-patches

From Michael Paesold
Subject Re: Fix for VACUUM in psql autocommit off
Date
Msg-id 001001c49e88$0e345cb0$d604460a@zaphod
Whole thread Raw
In response to Fix for VACUUM in psql autocommit off  ("Michael Paesold" <mpaesold@gmx.at>)
Responses Re: Fix for VACUUM in psql autocommit off
List pgsql-patches
Tom Lane wrote:


> If we're going to do that, we should also include the other statements
> that disallow execution in a transaction, and we should rename
> is_transact_command to something more appropriate (not to mention fix
> its comments).  A quick grep shows
>
> PreventTransactionChain((void *) stmt, "CREATE DATABASE");
> PreventTransactionChain((void *) dbname, "DROP DATABASE");
> PreventTransactionChain((void *) stmt, "CLUSTER");
> PreventTransactionChain((void *) dbname, "REINDEX DATABASE");
> PreventTransactionChain((void *) vacstmt, stmttype);
> PreventTransactionChain((void *) stmt, "CREATE TABLESPACE");
> PreventTransactionChain((void *) stmt, "DROP TABLESPACE");

> Handling the multi-keyword cases is going to take a nontrivial increment
> of functionality.  Perhaps while we're at it, we could teach this code
> about nested /* comments ...

Currently there is no need for nested comments, because those are only
single word queries. Or do I not understand what you mean by nested
comments? (There is code for ignore /* .. */ before the first keyword.)

Any suggestion how to that? I can think of a way myself, but it may not be
the best, as I don't consider C my natural language. I can try, or does
anyone else feel inclined to fix this?

Best Regards,
Michael Paesold


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix for VACUUM in psql autocommit off
Next
From: Tom Lane
Date:
Subject: Re: Fix for VACUUM in psql autocommit off