log_filename()

Started by Joshua D. Drakealmost 18 years ago5 messageshackers
Jump to latest
#1Joshua D. Drake
jd@commandprompt.com

We got the comment on the docs:

log_filename(string) is misleading, since it really doesn't use a
strftime pattern, but instead a reimplementation of strftime, in order
to be cross-platform. There is no documentation on this except to look
in src/timezone/strftime.c (the function is called pg_strftime)

Is it true?

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joshua D. Drake (#1)
Re: log_filename()

"Joshua D. Drake" <jd@commandprompt.com> writes:

We got the comment on the docs:
log_filename(string) is misleading, since it really doesn't use a
strftime pattern, but instead a reimplementation of strftime, in order
to be cross-platform.

AFAIK that implementation covers everything that's in the POSIX
spec... was this person whining because he tried to use some
nonstandard extension?

regards, tom lane

#3Joshua D. Drake
jd@commandprompt.com
In reply to: Tom Lane (#2)
Re: log_filename()

On Sun, 20 Apr 2008 21:32:53 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

"Joshua D. Drake" <jd@commandprompt.com> writes:

We got the comment on the docs:
log_filename(string) is misleading, since it really doesn't use a
strftime pattern, but instead a reimplementation of strftime, in
order to be cross-platform.

AFAIK that implementation covers everything that's in the POSIX
spec... was this person whining because he tried to use some
nonstandard extension?

That is verbatim what was stated, *shrug*.

Sincerely,

Joshua D. Drake

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Joshua D. Drake (#1)
Re: log_filename()

Joshua D. Drake wrote:

We got the comment on the docs:

log_filename(string) is misleading, since it really doesn't use a
strftime pattern, but instead a reimplementation of strftime, in order
to be cross-platform. There is no documentation on this except to look
in src/timezone/strftime.c (the function is called pg_strftime)

Correct. I propose the attached patch.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachments:

strftime.patchtext/x-diff; charset=us-asciiDownload+8-4
#5Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Alvaro Herrera (#4)
Re: log_filename()

Alvaro Herrera wrote:

Joshua D. Drake wrote:

We got the comment on the docs:

log_filename(string) is misleading, since it really doesn't use a
strftime pattern, but instead a reimplementation of strftime, in order
to be cross-platform. There is no documentation on this except to look
in src/timezone/strftime.c (the function is called pg_strftime)

Correct. I propose the attached patch.

Applied.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.