Re: Proposed GUC Variable

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposed GUC Variable
Date: 2002-08-27 21:05:33
Message-ID: 200208272105.g7RL5Y318829@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2002-08-27 21:05:59 Re: Open 7.3 items
Previous Message Rod Taylor 2002-08-27 21:03:17 Re: Proposed GUC Variable

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-08-27 21:06:48 Re: Proposed GUC Variable
Previous Message Rod Taylor 2002-08-27 21:03:17 Re: Proposed GUC Variable