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: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]