diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2002-02-19 08:23:22 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2002-02-19 08:23:22 +0000 |
commit | 0c0bcdc10ba6c2d0bbf6c831f5bc05a32470a2e7 (patch) | |
tree | e2c20382071c1aac790898564dea14a5b332a404 /databases/postgresql80-server/files/patch-jdbc-getdate | |
parent | APP_TITLE was set twice. (diff) |
Upgrade to 7.2, and spilit into several ports.
PR: ports/34855
Submitted by: maintainer.
Notes
Notes:
svn path=/head/; revision=54887
Diffstat (limited to 'databases/postgresql80-server/files/patch-jdbc-getdate')
-rw-r--r-- | databases/postgresql80-server/files/patch-jdbc-getdate | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/databases/postgresql80-server/files/patch-jdbc-getdate b/databases/postgresql80-server/files/patch-jdbc-getdate deleted file mode 100644 index 744407ae14b5..000000000000 --- a/databases/postgresql80-server/files/patch-jdbc-getdate +++ /dev/null @@ -1,34 +0,0 @@ ---- src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java~ Fri Feb 23 19:12:23 2001 -+++ src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java Wed May 9 04:31:11 2001 -@@ -423,8 +423,13 @@ - String s = getString(columnIndex); - if(s==null) - return null; -- -- return java.sql.Date.valueOf(s); -+ // length == 10: SQL Date -+ // length > 10: SQL Timestamp, assumes PGDATESTYLE=ISO -+ try { -+ return java.sql.Date.valueOf((s.length() == 10) ? s : s.substring(0,10)); -+ } catch (NumberFormatException e) { -+ throw new PSQLException("postgresql.res.baddate", s); -+ } - } - - /** -@@ -441,8 +446,13 @@ - - if(s==null) - return null; // SQL NULL -- -- return java.sql.Time.valueOf(s); -+ // length == 8: SQL Time -+ // length > 8: SQL Timestamp -+ try { -+ return java.sql.Time.valueOf((s.length() == 8) ? s : s.substring(11,19)); -+ } catch (NumberFormatException e) { -+ throw new PSQLException("postgresql.res.badtime",s); -+ } - } - - /** |