Re: libpq debug log

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: libpq debug log
Дата
Msg-id
3650140.1617372290@sss.pgh.pa.us
Ответ на
Re: libpq debug log (Alvaro Herrera)
Список
Дерево обсуждения
RE: libpq debug log "Iwata, Aya" <iwata.aya@jp.fujitsu.com>
Alvaro Herrera  writes:
> As in the attached patch.

+1, but the comment could be more specific.  Maybe like "In regress mode,
suppress the length of ErrorResponse and NoticeResponse messages --- the F
(file name) field, in particular, can vary in length depending on compiler
used."

Actually though ... I recall now that elog.c tries to standardize the F
output by stripping the path part:

		/* keep only base name, useful especially for vpath builds */
		slash = strrchr(filename, '/');
		if (slash)
			filename = slash + 1;

I bet what is happening on drongo is that the compiler has generated a
__FILE__ value that contains backslashes not slashes, and this code
doesn't know how to shorten those.  So maybe instead of lobotomizing
this test, we should fix that.

		slash = strrchr(filename, '/');
+		if (!slash)
+			slash = strrchr(filename, '\\');
		if (slash)
			filename = slash + 1;

			regards, tom lane


В списке pgsql-hackers по дате отправления
От: Isaac Morland
Дата:
От: Bruce Momjian
Дата:
FAQ