Skip site navigation (1) Skip section navigation (2)

Re: Annoying error messages in _dosmaperr

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Annoying error messages in _dosmaperr
Date: 2008-10-16 01:34:05
Message-ID: 20081016102603.897D.52131E4D@oss.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It's probably not worth the trouble to do that, but maybe we could just
> have a FRONTEND_DEBUG compile time switch:
> That would at least leave the code in place if anyone needed the
> debugging output badly enough to do a custom build.

It would be a simplest solution.

I grep-ed sources with #ifndef FRONTEND and #ifdef FRONTEND,
but there are no other "DEBUG or stderr" codes. All other codes
are "WARNING/LOG or stderr", so I keep all of them as-is.


Index: src/port/win32error.c
===================================================================
--- src/port/win32error.c	(HEAD)
+++ src/port/win32error.c	(working copy)
@@ -180,7 +180,7 @@
 			ereport(DEBUG5,
 					(errmsg_internal("mapped win32 error code %lu to %d",
 									 e, errno)));
-#else
+#elif FRONTEND_DEBUG
 			fprintf(stderr, _("mapped win32 error code %lu to %d"), e, errno);
 #endif
 			return;


Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



In response to

Responses

pgsql-hackers by date

Next:From: Neil ConwayDate: 2008-10-16 02:18:30
Subject: Memory leak on hashed agg rescan
Previous:From: ITAGAKI TakahiroDate: 2008-10-16 01:33:20
Subject: Re: contrib/pg_stat_statements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group