Rod Taylor wrote:
-- Start of PGP signed section.
> > have also added code to convert end-of-line characters to \n and \r, and
> > doubles backslashes.  It also makes log_statement print as one line, and
> > shows pg_stat_activity as one line.  Without this fix, you get:
> 
> And how does it look with what was originally a fairly readable 30 or 40
> line query?

Probably pretty long.  I think the pg_stat_activity case really needs
the "\n" because if not the query breaks the table output format.  Not
sure about log_statement or log_min_duration_statement.  Having it be
one line makes grep easy, and is probably easier for processing via
tools, but reading the log could be harder:

  LOG:  duration: 7.466 ms; select *\nfrom pg_class\nwhere oid = 3 and\nrelname = 
'abcd' and\nrelkind = 'r'\norder by relname;

The old format output was:

  LOG:  duration: 7.466 ms; select *
  from pg_class
  where oid = 3 and
  relname = 'abcd' and
  relkind = 'r'
  order by relname;

It is hard to understand how a tool would grab the query from the above
log except to look for another TAG: entry and stop there.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to