Rod Taylor wrote:
> On Tue, 2002-08-27 at 16: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.
>
> I could go for the first 1000 characters, but 80 is almost useless for
> most of our stuff. 80 wouldn't get through the select list a good chunk
> of the time.
>
> If an application in the product environment is throwing an error, we'd
> want the full thing. Most of our internal systems are completely hands
> off unless it's been scripted and tested elsewhere, so it's not like
> user queries would be getting into it.
>
> Perhaps a GUC for the length? But I'd still opt for storing the whole
> thing. Yes, someone could fill up the disk but a rotating log would
> help that.
A length value would work, default to 80 and let someone turn it off
with zero and unlimited with 9999 or -1.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073