diff options
author | vanilla <vanilla@FreeBSD.org> | 2001-05-09 14:00:37 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2001-05-09 14:00:37 +0800 |
commit | 053444abcd863021ad1c78436bec45d8372b34ce (patch) | |
tree | 4f9d54f8d493a8ee56e9b96b9edc452707d497be /databases/postgresql83-server/files | |
parent | 6ad8e66e7eb73bbce6f3cb3dcf95bc6b898ec4e4 (diff) | |
download | freebsd-ports-gnome-053444abcd863021ad1c78436bec45d8372b34ce.tar.gz freebsd-ports-gnome-053444abcd863021ad1c78436bec45d8372b34ce.tar.zst freebsd-ports-gnome-053444abcd863021ad1c78436bec45d8372b34ce.zip |
Upgrade to 7.1.1
PR: ports/27220
Submitted by: maintainer
Diffstat (limited to 'databases/postgresql83-server/files')
-rw-r--r-- | databases/postgresql83-server/files/patch-jdbc-getdate | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/databases/postgresql83-server/files/patch-jdbc-getdate b/databases/postgresql83-server/files/patch-jdbc-getdate new file mode 100644 index 000000000000..744407ae14b5 --- /dev/null +++ b/databases/postgresql83-server/files/patch-jdbc-getdate @@ -0,0 +1,34 @@ +--- 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); ++ } + } + + /** |