On 10/19/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > When setting log_statement = 'all', statements that fail parsing are not
> > logged.
> > Is that intentional?
>
> The 'mod' and 'ddl' settings obviously can't be handled until after
> basic parsing. We could create a completely separate code path for
> 'all' but I'm not sure I see the point.
Hello,
Sometimes it can be very useful to be able to see even the incorrect
commands: for example when the incorrect query is generated by an
application or library that you haven't written yourself .
A few days ago I was experimenting with Lazarus (an object-pascal
based IDE similar to Delphi) and I was getting some unexpected syntax
errors. In order to debug the problem i had to hack the sources of the
postgres unit and add some writeln's right before the PQexec calls .
It would have been much more convenient to see the bad queries in
the logs ...
--
Adrian Maier