Re: Proposed GUC Variable - Mailing list pgsql-hackers

From Larry Rosenman
Subject Re: Proposed GUC Variable
Date
Msg-id 1030482496.410.33.camel@lerlaptop.iadfw.net
Whole thread Raw
In response to Re: Proposed GUC Variable  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Proposed GUC Variable  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Tue, 2002-08-27 at 16:05, Bruce Momjian wrote:
> Larry Rosenman wrote:
> > On Tue, 2002-08-27 at 15:54, Bruce Momjian wrote:
> > > 
> > > I had an idea on this.  It seems pretty pointless to show a query error
> > > without a query, but some queries are very large.
> > > 
> > > How about if we print only the first 80 characters of the query, with
> > > newlines, tabs, and spaces reduced to a single space, and send that as
> > > LOG to the server logs.  That would give people enough context, and
> > > prevent us from having another GUC variable.
> > Not necessarily giving enough context.  I know I've had program
> > generated query's that were syntactically invalid WAY after the 80th
> > character. 
> > 
> > If you print ANY of the query, you should print all of it.  Look at the
> > code in elog.c that does the syslog splitting.  
> 
> But we should have some default to print some of the query, because
> right now we print none of it. I am not saying it is perfect, but it is
> better than what we have, and is a reasonable default.
On an error, you may not be able to reproduce it.  Why not print the
whole query to the log?

I don't see a reason for truncating it at 80 chars. 

IMHO, of course. 
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposed GUC Variable
Next
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] Bug #718: request for improvement of /? to