empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From der...@apache.org
Subject [02/14] empire-db git commit: EMPIREDB-248 Submitted fix provided by Alberto Osvaldo Gonzalez
Date Wed, 09 Nov 2016 10:59:09 GMT
EMPIREDB-248
Submitted fix provided by Alberto Osvaldo Gonzalez 

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/325e4223
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/325e4223
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/325e4223

Branch: refs/heads/EMPIREDB-247
Commit: 325e4223c0539e5e607109a078ef9004522a031d
Parents: 386368c
Author: Rainer Döbele <doebele@esteam.de>
Authored: Sat Oct 29 13:27:12 2016 +0200
Committer: Rainer Döbele <doebele@esteam.de>
Committed: Sat Oct 29 13:27:12 2016 +0200

----------------------------------------------------------------------
 .../empire/db/postgresql/DBDatabaseDriverPostgreSQL.java       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/325e4223/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
b/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
index 5965dc7..21024e8 100644
--- a/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
+++ b/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
@@ -361,9 +361,9 @@ public class DBDatabaseDriverPostgreSQL extends DBDatabaseDriver
             case SQL_FUNC_FLOOR:              return "floor(?)";
             case SQL_FUNC_MODULO:             return "mod(?,{0})";
             // Date
-            case SQL_FUNC_DAY:                return "day(?)";
-            case SQL_FUNC_MONTH:              return "month(?)";
-            case SQL_FUNC_YEAR:               return "year(?)";
+			case SQL_FUNC_DAY:                return "extract(day from ?)";
+			case SQL_FUNC_MONTH:              return "extract(month from ?)";
+			case SQL_FUNC_YEAR:               return "extract(year from ?)";
             // Aggregation
             case SQL_FUNC_SUM:                return "sum(?)";
             case SQL_FUNC_MAX:                return "max(?)";


Mime
View raw message