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
22f03030
Commit
22f03030
authored
May 27, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile of entab to use stdarg.h. Clean up includes.
Marko Kreen
parent
a4374f90
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
37 deletions
+35
-37
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datetime.c
+4
-7
src/interfaces/ecpg/pgtypeslib/interval.c
src/interfaces/ecpg/pgtypeslib/interval.c
+1
-1
src/test/regress/expected/horology.out
src/test/regress/expected/horology.out
+20
-20
src/tools/entab/entab.c
src/tools/entab/entab.c
+7
-4
src/tools/entab/halt.c
src/tools/entab/halt.c
+3
-5
No files found.
src/backend/utils/adt/datetime.c
View file @
22f03030
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.14
7 2005/05/26 15:26:00
momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.14
8 2005/05/27 15:15:23
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -3461,12 +3461,9 @@ EncodeTimeOnly(struct pg_tm * tm, fsec_t fsec, int *tzp, int style, char *str)
...
@@ -3461,12 +3461,9 @@ EncodeTimeOnly(struct pg_tm * tm, fsec_t fsec, int *tzp, int style, char *str)
#ifdef HAVE_INT64_TIMESTAMP
#ifdef HAVE_INT64_TIMESTAMP
sprintf
(
str
+
strlen
(
str
),
":%02d.%06d"
,
tm
->
tm_sec
,
fsec
);
sprintf
(
str
+
strlen
(
str
),
":%02d.%06d"
,
tm
->
tm_sec
,
fsec
);
#else
#else
sprintf
(
str
+
strlen
(
str
),
":%01
3.10
f"
,
tm
->
tm_sec
+
fsec
);
sprintf
(
str
+
strlen
(
str
),
":%01
2.9
f"
,
tm
->
tm_sec
+
fsec
);
#endif
#endif
/* chop off trailing pairs of zeros... */
TrimTrailingZeros
(
str
);
while
(
strcmp
((
str
+
strlen
(
str
)
-
2
),
"00"
)
==
0
&&
*
(
str
+
strlen
(
str
)
-
3
)
!=
'.'
)
*
(
str
+
strlen
(
str
)
-
2
)
=
'\0'
;
}
}
else
else
sprintf
(
str
+
strlen
(
str
),
":%02d"
,
tm
->
tm_sec
);
sprintf
(
str
+
strlen
(
str
),
":%02d"
,
tm
->
tm_sec
);
...
@@ -3804,7 +3801,7 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
...
@@ -3804,7 +3801,7 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
sprintf
(
cp
,
".%06d"
,
Abs
(
fsec
));
sprintf
(
cp
,
".%06d"
,
Abs
(
fsec
));
#else
#else
fsec
+=
tm
->
tm_sec
;
fsec
+=
tm
->
tm_sec
;
sprintf
(
cp
,
":%01
3.10
f"
,
fabs
(
fsec
));
sprintf
(
cp
,
":%01
2.9
f"
,
fabs
(
fsec
));
#endif
#endif
TrimTrailingZeros
(
cp
);
TrimTrailingZeros
(
cp
);
cp
+=
strlen
(
cp
);
cp
+=
strlen
(
cp
);
...
...
src/interfaces/ecpg/pgtypeslib/interval.c
View file @
22f03030
...
@@ -511,7 +511,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
...
@@ -511,7 +511,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
sprintf
(
cp
,
".%06d"
,
Abs
(
fsec
));
sprintf
(
cp
,
".%06d"
,
Abs
(
fsec
));
#else
#else
fsec
+=
tm
->
tm_sec
;
fsec
+=
tm
->
tm_sec
;
sprintf
(
cp
,
":%013.10
f"
,
fabs
(
fsec
));
sprintf
(
cp
,
":%012.9
f"
,
fabs
(
fsec
));
#endif
#endif
TrimTrailingZeros
(
cp
);
TrimTrailingZeros
(
cp
);
cp
+=
strlen
(
cp
);
cp
+=
strlen
(
cp
);
...
...
src/test/regress/expected/horology.out
View file @
22f03030
...
@@ -205,62 +205,62 @@ SET DateStyle = 'ISO';
...
@@ -205,62 +205,62 @@ SET DateStyle = 'ISO';
-- As of 7.4, allow time without time zone having a time zone specified
-- As of 7.4, allow time without time zone having a time zone specified
SELECT time without time zone '040506.789+08';
SELECT time without time zone '040506.789+08';
time
time
--------------
-
--------------
04:05:06.789
0
04:05:06.789
(1 row)
(1 row)
SELECT time without time zone '040506.789-08';
SELECT time without time zone '040506.789-08';
time
time
--------------
-
--------------
04:05:06.789
0
04:05:06.789
(1 row)
(1 row)
SELECT time without time zone 'T040506.789+08';
SELECT time without time zone 'T040506.789+08';
time
time
--------------
-
--------------
04:05:06.789
0
04:05:06.789
(1 row)
(1 row)
SELECT time without time zone 'T040506.789-08';
SELECT time without time zone 'T040506.789-08';
time
time
--------------
-
--------------
04:05:06.789
0
04:05:06.789
(1 row)
(1 row)
SELECT time with time zone '040506.789+08';
SELECT time with time zone '040506.789+08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
+08
04:05:06.789+08
(1 row)
(1 row)
SELECT time with time zone '040506.789-08';
SELECT time with time zone '040506.789-08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
-08
04:05:06.789-08
(1 row)
(1 row)
SELECT time with time zone 'T040506.789+08';
SELECT time with time zone 'T040506.789+08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
+08
04:05:06.789+08
(1 row)
(1 row)
SELECT time with time zone 'T040506.789-08';
SELECT time with time zone 'T040506.789-08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
-08
04:05:06.789-08
(1 row)
(1 row)
SELECT time with time zone 'T040506.789 +08';
SELECT time with time zone 'T040506.789 +08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
+08
04:05:06.789+08
(1 row)
(1 row)
SELECT time with time zone 'T040506.789 -08';
SELECT time with time zone 'T040506.789 -08';
timetz
timetz
-----------------
-
-----------------
04:05:06.789
0
-08
04:05:06.789-08
(1 row)
(1 row)
SET DateStyle = 'Postgres, MDY';
SET DateStyle = 'Postgres, MDY';
...
...
src/tools/entab/entab.c
View file @
22f03030
...
@@ -11,8 +11,13 @@
...
@@ -11,8 +11,13 @@
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <stdarg.h>
#include "../../include/c.h"
#if defined(WIN32) || defined(__CYGWIN__)
#define PG_BINARY_R "rb"
#else
#define PG_BINARY_R "r"
#endif
#define NUL '\0'
#define NUL '\0'
...
@@ -29,9 +34,7 @@ extern char *optarg;
...
@@ -29,9 +34,7 @@ extern char *optarg;
extern
int
optind
;
extern
int
optind
;
int
int
main
(
argc
,
argv
)
main
(
int
argc
,
char
**
argv
)
int
argc
;
char
**
argv
;
{
{
int
tab_size
=
8
,
int
tab_size
=
8
,
min_spaces
=
2
,
min_spaces
=
2
,
...
...
src/tools/entab/halt.c
View file @
22f03030
...
@@ -19,15 +19,13 @@
...
@@ -19,15 +19,13 @@
/*VARARGS*/
/*VARARGS*/
void
void
halt
(
const
char
*
path
,
...)
halt
(
const
char
*
format
,
...)
{
{
va_list
arg_ptr
;
va_list
arg_ptr
;
char
*
format
,
const
char
*
pstr
;
*
pstr
;
void
(
*
sig_func
)
();
void
(
*
sig_func
)
();
va_start
(
arg_ptr
,
path
);
va_start
(
arg_ptr
,
format
);
format
=
va_arg
(
arg_ptr
,
char
*
);
if
(
strncmp
(
format
,
"PERROR"
,
6
)
!=
0
)
if
(
strncmp
(
format
,
"PERROR"
,
6
)
!=
0
)
vfprintf
(
stderr
,
format
,
arg_ptr
);
vfprintf
(
stderr
,
format
,
arg_ptr
);
else
else
...
...
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