Re: Fix for VACUUM in psql autocommit off

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Paesold" <mpaesold(at)gmx(dot)at>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Fix for VACUUM in psql autocommit off
Date: 2004-09-19 20:44:22
Message-ID: 22029.1095626662@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> Or do I not understand what you mean by nested
> comments? (There is code for ignore /* .. */ before the first keyword.)

Per SQL spec, the backend thinks that /* .. */ nests:

regression=# /* some /* comment */ comment */ select 1;
?column?
----------
1
(1 row)

As it stands, is_transact_command will get confused by this.

> 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?

I'd split out the code that locates "the next keyword" into a separate
function that could be called twice.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2004-09-19 21:00:44 Re: How to add locale support for each column?
Previous Message Michael Paesold 2004-09-19 20:34:25 Re: Fix for VACUUM in psql autocommit off