details:   https://code.openbravo.com/erp/devel/pi/rev/8442228af1dd
changeset: 33853:8442228af1dd
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Thu Apr 19 12:09:11 2018 +0200
summary:   fixes 38407: error message activating heartbeat in PG10

  Starting from PostgreSQL 10, server version string includes also package, 
being
  a longer String it doesn't fit current column size.

  Fixed by getting just the first word of the version (which is the actual 
server
  version) skipping the rest that refers to the package.

  Examples:

   9.3.21 -> 9.3.21
   10.3 (Ubuntu 10.3-1.pgdg16.04+1) -> 10.3
   11devel (Debian 11~~devel~20180418.2231-1~573.git5372c2c.pgdg90+1) -> 11devel

diffstat:

 src/org/openbravo/erpCommon/utility/SystemInfo.java |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r fa5700b5eeb2 -r 8442228af1dd 
src/org/openbravo/erpCommon/utility/SystemInfo.java
--- a/src/org/openbravo/erpCommon/utility/SystemInfo.java       Mon Apr 16 
15:59:24 2018 -0400
+++ b/src/org/openbravo/erpCommon/utility/SystemInfo.java       Thu Apr 19 
12:09:11 2018 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -444,6 +444,7 @@
       databaseVersion = getVersion(SystemInfoData.selectOracleVersion(conn));
     } else {
       databaseVersion = SystemInfoData.selectPostregresVersion(conn);
+      databaseVersion = databaseVersion.split(" ")[0];
     }
     return databaseVersion;
   }

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to