Sometimes client tools and psql sessions can execute queries that span more than one line. Here's an example of such, generated using psql:
postgres=# show log_line_prefix postgres-# ;
With statement logging enabled, this will show up in the standard text logs like this:
2010-03-28 21:23:49 EDT [10669]: [1-1] user=postgres,db=postgres,remote=[local] LOG: duration: 0.923 ms statement: show log_line_prefix ;
That's two lines of output. The dangling semicolon is the only thing on the second line, with no prefix appearing. Because of that, there's no way to associate that line with the rest of the query, given that log lines are not guaranteed to be grouped together in a more complicated environment; another line might get ...