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
8e6b74e4
Commit
8e6b74e4
authored
Oct 05, 2003
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in day of week processing.
parent
88605109
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
17 deletions
+7
-17
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/pgtypeslib/datetime.c
src/interfaces/ecpg/pgtypeslib/datetime.c
+2
-2
src/interfaces/ecpg/pgtypeslib/dt.h
src/interfaces/ecpg/pgtypeslib/dt.h
+0
-2
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/pgtypeslib/dt_common.c
+1
-12
src/interfaces/ecpg/pgtypeslib/timestamp.c
src/interfaces/ecpg/pgtypeslib/timestamp.c
+0
-1
No files found.
src/interfaces/ecpg/ChangeLog
View file @
8e6b74e4
...
...
@@ -1665,6 +1665,10 @@ Fri Sep 26 17:14:07 CEST 2003
Fri Oct 3 12:04:57 CEST 2003
- Hide Informix datatypes in PostgreSQL built process.
Sun Oct 5 13:08:47 CEST 2003
- Fixed bug in day of week calculation.
- Set ecpg version to 3.0.0
- Set ecpg library to 4.0.0
- Set pgtypes library to 1.0.0
...
...
src/interfaces/ecpg/pgtypeslib/datetime.c
View file @
8e6b74e4
...
...
@@ -126,7 +126,7 @@ PGTYPESdate_dayofweek(date dDate)
* Sunday: 0 Monday: 1 Tuesday: 2 Wednesday: 3
* Thursday: 4 Friday: 5 Saturday: 6
*/
return
6
-
j2day
(
dDate
+
3
)
;
return
(
int
)
(
dDate
+
date2j
(
2000
,
1
,
1
)
+
1
)
%
7
;
}
void
...
...
src/interfaces/ecpg/pgtypeslib/dt.h
View file @
8e6b74e4
...
...
@@ -300,8 +300,6 @@ int tm2timestamp(struct tm *, fsec_t, int *, timestamp *);
int
DecodeUnits
(
int
field
,
char
*
lowtoken
,
int
*
val
);
bool
ClearDateCache
(
bool
,
bool
,
bool
);
int
j2day
(
int
jd
);
bool
CheckDateTokenTables
(
void
);
int
EncodeDateOnly
(
struct
tm
*
,
int
,
char
*
,
bool
);
...
...
src/interfaces/ecpg/pgtypeslib/dt_common.c
View file @
8e6b74e4
...
...
@@ -637,17 +637,6 @@ j2date(int jd, int *year, int *month, int *day)
return
;
}
/* j2date() */
int
j2day
(
int
date
)
{
unsigned
int
day
;
day
=
date
;
day
+=
1
;
day
%=
7
;
return
(
int
)
day
;
}
/* j2day() */
/* DecodeSpecial()
* Decode text string using lookup table.
* Implement a cache lookup since it is likely that dates
...
...
@@ -931,7 +920,7 @@ EncodeDateTime(struct tm * tm, fsec_t fsec, int *tzp, char **tzn, int style, cha
/* Backward-compatible with traditional Postgres abstime dates */
day
=
date2j
(
tm
->
tm_year
,
tm
->
tm_mon
,
tm
->
tm_mday
);
tm
->
tm_wday
=
j2day
(
day
);
tm
->
tm_wday
=
(
int
)
((
day
+
date2j
(
2000
,
1
,
1
)
+
1
)
%
7
);
strncpy
(
str
,
days
[
tm
->
tm_wday
],
3
);
strcpy
((
str
+
3
),
" "
);
...
...
src/interfaces/ecpg/pgtypeslib/timestamp.c
View file @
8e6b74e4
...
...
@@ -11,7 +11,6 @@
#include "dt.h"
#include "pgtypes_timestamp.h"
#include "pgtypes_date.h"
#include "datetime.h"
int
PGTYPEStimestamp_defmt_scan
(
char
**
,
char
*
,
timestamp
*
,
int
*
,
int
*
,
int
*
,
int
*
,
int
*
,
int
*
,
int
*
);
...
...
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