pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: iwata.aya@fujitsu.com
Cc: tsunakawa.takay@fujitsu.com
Cc: k.jamison@fujitsu.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: libpq debug log
Date: Fri, 02 Apr 2021 10:04:50 -0400
Message-ID: <3650140.1617372290@sss.pgh.pa.us> (raw)
In-Reply-To: <20210402135218.GA13909@alvherre.pgsql>
References: <20210402135218.GA13909@alvherre.pgsql>

Alvaro Herrera <alvherre@alvh.no-ip.org> 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





view thread (234+ messages)  latest in thread

Message-ID: <3650140.1617372290@sss.pgh.pa.us>
Permalink:  ../3650140.1617372290@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3650140.1617372290@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, iwata.aya@fujitsu.com, tsunakawa.takay@fujitsu.com, k.jamison@fujitsu.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: libpq debug log
  In-Reply-To: <3650140.1617372290@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox