From: | "Michael Paesold" <mpaesold(at)gmx(dot)at> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Fix for VACUUM in psql autocommit off |
Date: | 2004-09-19 21:17:44 |
Message-ID: | 003401c49e8e$1af07f50$d604460a@zaphod |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> "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.
Ok, my patch does not solve that, but I will have a look at it. Tomorrow it
will be then, since it's already late here in Europe.
> > 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.
I have read this mail after making the attached patch, so I have used a
little different approach. I have moved the code to skip over whitespace and
comments into it's own function.
The code is not perfect, but it works. By not perfect I mean, it also
returns true, if you say "REINDEX TABLESPACE", but this does not exist
anyways.
Please have a look.
Regards,
Michael Paesold
Attachment | Content-Type | Size |
---|---|---|
psql-autocommit.diff | application/octet-stream | 2.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2004-09-20 00:02:04 | Re: How to add locale support for each column? |
Previous Message | Greg Stark | 2004-09-19 21:00:44 | Re: How to add locale support for each column? |