Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d81cd703
Commit
d81cd703
authored
Mar 22, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standardize output buffer size and display format for strftime;
followup to complaint from Korean User's Group.
parent
682a6bd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
+14
-15
contrib/pg_autovacuum/pg_autovacuum.c
contrib/pg_autovacuum/pg_autovacuum.c
+3
-4
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+3
-3
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+5
-5
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_controldata/pg_controldata.c
+3
-3
No files found.
contrib/pg_autovacuum/pg_autovacuum.c
View file @
d81cd703
...
...
@@ -5,9 +5,8 @@
*/
#include "pg_autovacuum.h"
#define TIMEBUFF 256
FILE
*
LOGOUTPUT
;
char
timebuffer
[
TIMEBUFF
];
char
logbuffer
[
4096
];
void
...
...
@@ -15,11 +14,11 @@ log_entry(const char *logentry)
{
time_t
curtime
;
struct
tm
*
loctime
;
char
timebuffer
[
128
];
curtime
=
time
(
NULL
);
loctime
=
localtime
(
&
curtime
);
strftime
(
timebuffer
,
TIMEBUFF
,
"%Y-%m-%d %r"
,
loctime
);
/* cbb - %F is not
* always available */
strftime
(
timebuffer
,
sizeof
(
timebuffer
),
"%Y-%m-%d %H:%M:%S %Z"
,
loctime
);
fprintf
(
LOGOUTPUT
,
"[%s] %s
\n
"
,
timebuffer
,
logentry
);
}
...
...
src/backend/utils/adt/nabstime.c
View file @
d81cd703
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.11
8 2003/11/29 19:51:58 pgsq
l Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.11
9 2004/03/22 15:34:22 tg
l Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1724,8 +1724,8 @@ timeofday(PG_FUNCTION_ARGS)
{
struct
timeval
tp
;
struct
timezone
tpz
;
char
templ
[
1
00
];
char
buf
[
1
00
];
char
templ
[
1
28
];
char
buf
[
1
28
];
text
*
result
;
int
len
;
...
...
src/backend/utils/error/elog.c
View file @
d81cd703
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.13
0 2004/03/21 22:29:11
tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.13
1 2004/03/22 15:34:22
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1187,9 +1187,9 @@ log_line_prefix(StringInfo buf)
case
't'
:
{
time_t
stamp_time
=
time
(
NULL
);
char
strfbuf
[
32
];
char
strfbuf
[
128
];
strftime
(
strfbuf
,
sizeof
(
strfbuf
),
"%Y-%m-%d %H:%M:%S"
,
strftime
(
strfbuf
,
sizeof
(
strfbuf
),
"%Y-%m-%d %H:%M:%S
%Z
"
,
localtime
(
&
stamp_time
));
appendStringInfoString
(
buf
,
strfbuf
);
}
...
...
@@ -1198,9 +1198,9 @@ log_line_prefix(StringInfo buf)
if
(
MyProcPort
)
{
time_t
stamp_time
=
MyProcPort
->
session_start
.
tv_sec
;
char
strfbuf
[
32
];
char
strfbuf
[
128
];
strftime
(
strfbuf
,
sizeof
(
strfbuf
),
"%Y-%m-%d %H:%M:%S"
,
strftime
(
strfbuf
,
sizeof
(
strfbuf
),
"%Y-%m-%d %H:%M:%S
%Z
"
,
localtime
(
&
stamp_time
));
appendStringInfoString
(
buf
,
strfbuf
);
}
...
...
src/bin/pg_controldata/pg_controldata.c
View file @
d81cd703
...
...
@@ -6,7 +6,7 @@
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
* licence: BSD
*
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.1
3 2004/02/11 22:55:25
tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.1
4 2004/03/22 15:34:22
tgl Exp $
*/
#include "postgres.h"
...
...
@@ -71,8 +71,8 @@ main(int argc, char *argv[])
char
ControlFilePath
[
MAXPGPATH
];
char
*
DataDir
;
crc64
crc
;
char
pgctime_str
[
32
];
char
ckpttime_str
[
32
];
char
pgctime_str
[
128
];
char
ckpttime_str
[
128
];
char
sysident_str
[
32
];
char
*
strftime_fmt
=
"%c"
;
char
*
progname
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment