Add strftime escapes to Log config

Started by Josh Berkusabout 15 years ago5 messagesdocs
Jump to latest
#1Josh Berkus
josh@agliodbs.com

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

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Josh Berkus (#1)
Re: Add strftime escapes to Log config

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&gt;, for
example.

#3Josh Berkus
josh@agliodbs.com
In reply to: Peter Eisentraut (#2)
Re: Add strftime escapes to Log config

We could also link to
<http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html&gt;, 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

#4Robert Haas
robertmhaas@gmail.com
In reply to: Josh Berkus (#3)
Re: Add strftime escapes to Log config

On Tue, Mar 29, 2011 at 2:53 PM, Josh Berkus <josh@agliodbs.com> wrote:

We could also link to
<http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html&gt;, 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

#5Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#2)
Re: Add strftime escapes to Log config

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&gt;, for
example.

Agreed. I have applied the attached patch to 9.1 and head.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachments:

/rtmp/strftimetext/x-diffDownload+4-0