Re: fix log_min_duration_statement logic error - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: fix log_min_duration_statement logic error
Date
Msg-id 200310052237.h95MbeS22339@candle.pha.pa.us
Whole thread Raw
In response to Re: fix log_min_duration_statement logic error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > Tom Lane writes:
> >> BTW, EXPLAIN ANALYZE puts out
> >> Total runtime: 406.53 msec
> >> Do you want to make an exception to the string freeze to change this
> >> to "ms"?
>
> > I just realized, all the things that are sent as a query result instead of
> > an error or notice are not gettext-enabled.  I guess we'll have to do
> > without that in this release.  So, making the above change does not pose a
> > problem.
>
> Okay, I'll make that change.  Any opinions about the 2-vs-3-digit issue?

I just committed a fix so psql \timing shows three digits:

    test=> \timing
    Timing is on.
    test=> select 1;
     ?column?
    ----------
            1
    (1 row)

    Time: 1.306 ms

--
  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, Pennsylvania 19073
? psql
Index: common.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/common.c,v
retrieving revision 1.74
diff -c -c -r1.74 common.c
*** common.c    16 Sep 2003 17:59:02 -0000    1.74
--- common.c    5 Oct 2003 22:31:26 -0000
***************
*** 550,556 ****

      /* Possible microtiming output */
      if (pset.timing && success)
!         printf(gettext("Time: %.2f ms\n"), DIFF_MSEC(after, before));

      return success;
  }
--- 550,556 ----

      /* Possible microtiming output */
      if (pset.timing && success)
!         printf(gettext("Time: %.3f ms\n"), DIFF_MSEC(after, before));

      return success;
  }

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: fix log_min_duration_statement logic error
Next
From: Bruce Momjian
Date:
Subject: Re: fix log_min_duration_statement logic error