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
f7b89ac5
Commit
f7b89ac5
authored
Oct 17, 2000
by
Peter Mount
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more getTimestamp() fixes
parent
d3f65528
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
src/interfaces/jdbc/CHANGELOG
src/interfaces/jdbc/CHANGELOG
+5
-1
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
+17
-1
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
+17
-1
No files found.
src/interfaces/jdbc/CHANGELOG
View file @
f7b89ac5
Tue Oct 17 15:35:00 BST 2000 petermount@maidstone.gov.uk
- Changed getTimestamp() again. This time Michael Stephenson's
<mstephenson@tirin.openworld.co.uk> solution looked far better
than the original solution put in June.
Tue Oct 10 13:12:00 BST 2000 peter@retep.org.uk
- DatabaseMetaData.supportsAlterTableWithDropColumn() as psql doesn't
support dropping of individual columns
...
...
@@ -13,7 +18,6 @@ Mon Sep 25 14:22:00 BST 2000 peter@retep.org.uk
- Removed the DriverClass kludge. Now the org.postgresql.Driver class
is compiled from a template file, and now has both the connection
class (ie jdbc1/jdbc2) and the current version's from Makefile.global
-
Thu Jul 20 16:30:00 BST 2000 petermount@it.maidstone.gov.uk
- Fixed DatabaseMetaData.getTableTypes()
...
...
src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
View file @
f7b89ac5
...
...
@@ -462,7 +462,23 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
if
(
s
==
null
)
return
null
;
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
// This works, but it's commented out because Michael Stephenson's
// solution is better still:
//SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Michael Stephenson's solution:
SimpleDateFormat
df
=
null
;
if
(
s
.
length
()>
21
&&
s
.
indexOf
(
'.'
)
!=
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss.SSzzz"
);
}
else
if
(
s
.
length
()>
19
&&
s
.
indexOf
(
'.'
)
==
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:sszzz"
);
}
else
if
(
s
.
length
()>
19
&&
s
.
indexOf
(
'.'
)
!=
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:ss.SS"
);
}
else
if
(
s
.
length
()>
10
&&
s
.
length
()<=
18
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:ss"
);
}
else
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
try
{
return
new
Timestamp
(
df
.
parse
(
s
).
getTime
());
...
...
src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
View file @
f7b89ac5
...
...
@@ -465,7 +465,23 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
if
(
s
==
null
)
return
null
;
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
// This works, but it's commented out because Michael Stephenson's
// solution is better still:
//SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Michael Stephenson's solution:
SimpleDateFormat
df
=
null
;
if
(
s
.
length
()>
21
&&
s
.
indexOf
(
'.'
)
!=
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss.SSzzz"
);
}
else
if
(
s
.
length
()>
19
&&
s
.
indexOf
(
'.'
)
==
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:sszzz"
);
}
else
if
(
s
.
length
()>
19
&&
s
.
indexOf
(
'.'
)
!=
-
1
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:ss.SS"
);
}
else
if
(
s
.
length
()>
10
&&
s
.
length
()<=
18
)
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:MM:ss"
);
}
else
{
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
}
try
{
return
new
Timestamp
(
df
.
parse
(
s
).
getTime
());
...
...
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