Andrew Dunstan [EMAIL PROTECTED] writes:
Tom Lane wrote:
Has any of this discussion taken into account the fact that a
querystring may contain multiple commands?
What does the parser do if one of the statements has an error and the
others are OK?
The whole thing is rejected. This is just
Tom Lane wrote:
The current definition of log_statement has no problem because we print
the whole string, once, before parsing starts. If you put a printout
into the per-parse-tree loop then I think you are going to get multiple
printouts of the same string.
I didn't intend to - I intended to
Andrew Dunstan wrote:
It does print it. In fact the example I gave below which is from a
real trace shows it being printed. It is just printed after the error
message rather than before.
You solution doesn't appear to address the problem of what to do if
they ask for only DDL and
Tom Lane wrote:
Andrew Dunstan [EMAIL PROTECTED] writes:
Tom Lane wrote:
Has any of this discussion taken into account the fact that a
querystring may contain multiple commands?
What does the parser do if one of the statements has an error and the
others are OK?
The whole thing is
Bruce Momjian wrote:
Well, if that is the question, then I don't want to reorder the query
printout from the error.
OK. I'll let someone else do it. I have no need for it. Forget I spoke.
cheers
andrew
---(end of broadcast)---
TIP 8: explain
The problem I see with this patch is that it doesn't print the error
query on a syntax error. That seems wrong.
I think you should print the query before parsing if they are asking for
all queries to be logged, and print them after parsing if they want only
DDL or DDL and data modification