public inbox for [email protected]
help / color / mirror / Atom feedAdd strftime escapes to Log config
5+ messages / 4 participants
[nested] [flat]
* Add strftime escapes to Log config
@ 2011-03-20 20:32 Josh Berkus <[email protected]>
2011-03-28 18:48 ` Re: Add strftime escapes to Log config Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 5+ messages in thread
From: Josh Berkus @ 2011-03-20 20:32 UTC (permalink / raw)
To: pgsql-docs
All,
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.
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Add strftime escapes to Log config
2011-03-20 20:32 Add strftime escapes to Log config Josh Berkus <[email protected]>
@ 2011-03-28 18:48 ` Peter Eisentraut <[email protected]>
2011-03-29 18:53 ` Re: Add strftime escapes to Log config Josh Berkus <[email protected]>
2011-09-06 02:58 ` Re: Add strftime escapes to Log config Bruce Momjian <[email protected]>
0 siblings, 2 replies; 5+ messages in thread
From: Peter Eisentraut @ 2011-03-28 18:48 UTC (permalink / raw)
To: Josh Berkus <[email protected]>; +Cc: pgsql-docs
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
<http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html;, for
example.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Add strftime escapes to Log config
2011-03-20 20:32 Add strftime escapes to Log config Josh Berkus <[email protected]>
2011-03-28 18:48 ` Re: Add strftime escapes to Log config Peter Eisentraut <[email protected]>
@ 2011-03-29 18:53 ` Josh Berkus <[email protected]>
2011-04-05 16:46 ` Re: Add strftime escapes to Log config Robert Haas <[email protected]>
1 sibling, 1 reply; 5+ messages in thread
From: Josh Berkus @ 2011-03-29 18:53 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: pgsql-docs
> We could also link to
> <http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html;, for
> example.
That would be helpful. I still think we want a few examples in our
docs, though.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Add strftime escapes to Log config
2011-03-20 20:32 Add strftime escapes to Log config Josh Berkus <[email protected]>
2011-03-28 18:48 ` Re: Add strftime escapes to Log config Peter Eisentraut <[email protected]>
2011-03-29 18:53 ` Re: Add strftime escapes to Log config Josh Berkus <[email protected]>
@ 2011-04-05 16:46 ` Robert Haas <[email protected]>
0 siblings, 0 replies; 5+ messages in thread
From: Robert Haas @ 2011-04-05 16:46 UTC (permalink / raw)
To: Josh Berkus <[email protected]>; +Cc: Peter Eisentraut <[email protected]>; pgsql-docs
On Tue, Mar 29, 2011 at 2:53 PM, Josh Berkus <[email protected]> wrote:
>> We could also link to
>> <http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html;, for
>> example.
>
> That would be helpful. I still think we want a few examples in our
> docs, though.
Patch?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Add strftime escapes to Log config
2011-03-20 20:32 Add strftime escapes to Log config Josh Berkus <[email protected]>
2011-03-28 18:48 ` Re: Add strftime escapes to Log config Peter Eisentraut <[email protected]>
@ 2011-09-06 02:58 ` Bruce Momjian <[email protected]>
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Momjian @ 2011-09-06 02:58 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; +Cc: Josh Berkus <[email protected]>; pgsql-docs
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
> <http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html;, for
> example.
Agreed. I have applied the attached patch to 9.1 and head.
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
[text/x-diff] /rtmp/strftime (849B, 2-%2Frtmp%2Fstrftime)
download | inline diff:
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 <literal>%</literal>-escapes, the computation
is done in the zone specified
by <xref linkend="guc-log-timezone">.)
+ The supported <literal>%</literal>-escapes are similar to those
+ listed in the Open Group's <ulink
+ url="http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html">strftime
+ </ulink> specification.
Note that the system's <systemitem>strftime</systemitem> is not used
directly, so platform-specific (nonstandard) extensions do not work.
</para>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2011-09-06 02:58 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-20 20:32 Add strftime escapes to Log config Josh Berkus <[email protected]>
2011-03-28 18:48 ` Peter Eisentraut <[email protected]>
2011-03-29 18:53 ` Josh Berkus <[email protected]>
2011-04-05 16:46 ` Robert Haas <[email protected]>
2011-09-06 02:58 ` Bruce Momjian <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox