Re: [GENERAL] Postgres csv logging - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Postgres csv logging
Date
Msg-id CAKFQuwYnAWh5abOs2oH9OmZ3aCQiDnqu1DS9SPSJJMvuVgHZBQ@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Postgres csv logging  (Alessandro_feliz <Alessandro_feliz@hotmail.com>)
Responses Re: [GENERAL] Postgres csv logging
List pgsql-general
It is customary to indicate when you've posted the same question to other forums - in this case SO.


As the comment there says your config and your output seem at odds.  Though I think your confusion is still adequately represented.

On Wed, Jul 19, 2017 at 4:41 PM, Alessandro_feliz <Alessandro_feliz@hotmail.com> wrote:
Why is the first line, that has the query executed, saying that the command
tag is "idle", shouldn't it say "SELECT"?

"Command tag: type of session's current command" - given your example I suppose this means "initial state of the session" as opposed to being a category tag of what the current line is doing.  What you are seeing is "start at idle and parse" the incoming statement text.  That is one action - parse.  The subsequent action is "execute" the contents of the SELECT that is now in the active state of the session.

If the above is correct the docs could be more clear since I'd agree that your interpretation of the field seems more logical - though knowing initial state is quite useful in its own right.

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Bug in postgres 9.6.2?
Next
From: Igor Korot
Date:
Subject: Re: [GENERAL] Backward compatibility