Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 40274B5DE7F for ; Mon, 5 Sep 2011 23:59:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72672-04 for ; Tue, 6 Sep 2011 02:59:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 50A9EB5DE7A for ; Mon, 5 Sep 2011 23:59:03 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p862wv529634; Mon, 5 Sep 2011 22:58:57 -0400 (EDT) From: Bruce Momjian Message-Id: <201109060258.p862wv529634@momjian.us> Subject: Re: Add strftime escapes to Log config In-Reply-To: <1301338110.17107.0.camel@vanquo.pezone.net> To: Peter Eisentraut Date: Mon, 5 Sep 2011 22:58:57 -0400 (EDT) CC: Josh Berkus , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1315277937-20820-2_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/16 X-Sequence-Number: 6937 --ELM1315277937-20820-2_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Peter Eisentraut wrote: > On s?n, 2011-03-20 at 13:32 -0700, Josh Berkus wrote: > > This page: > > > > http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHERE > > > > has the following text: > > > > The value is treated as a strftime pattern, so %-escapes can be used to > > specify time-varying file names. > > > > However, nowhere in our docs do we list sample strftime escapes. This > > means that PG DBAs who are not programmers (and even some who are) end > > up googling for them all the time. So I would like to add the following > > text: > > > > Useful excape codes which are available on most platforms include: %Y = > > year, %m = month, %d = day of month, %H = hour, %M = minute, %a = short > > weekday name, and %b = short month name. > > We could also link to > , for > example. Agreed. I have applied the attached patch to 9.1 and head. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --ELM1315277937-20820-2_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/strftime" diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml new file mode 100644 index 4b35169..615b2b0 *** a/doc/src/sgml/config.sgml --- b/doc/src/sgml/config.sgml *************** local0.* /var/log/postgresql *** 3086,3091 **** --- 3086,3095 ---- any time-zone-dependent %-escapes, the computation is done in the zone specified by .) + The supported %-escapes are similar to those + listed in the Open Group's strftime + specification. Note that the system's strftime is not used directly, so platform-specific (nonstandard) extensions do not work. --ELM1315277937-20820-2_--