Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039332Openbravo ERPA. Platformpublic2018-09-20 19:272018-09-25 20:57
caristu 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR18Q4 
caristu
Core
No
0039332: PG 11: ad_db_modified function fails
The ad_db_modified fails in PostgreSQL11, because it is using a query[1] that makes use of the proisagg column which does not longer exists in the pg_proc catalog table.

Note that the function is failing silently because on case of error, the exception is caught and 'N' is returned.

[1] https://code.openbravo.com/erp/devel/pi/file/tip/src-db/database/model/prescript-PostgreSql.sql#l1341 [^]
Using PostgreSQL 11:
1. Apply the attached patch (just for testing) that raises an exception in case an error happens during the execution of the ad_db_modified function.
2. Run ant install.source. It fails:

database.postcreate.POSTGRE:
      [sql] Executing commands
      [sql] Failed to execute: SELECT AD_DB_MODIFIED('Y')

BUILD FAILED
/home/openbravo/src/openbravo/pi/build.xml:686: The following error occurred while executing this line:
/home/openbravo/src/openbravo/pi/src-db/database/build-create.xml:53: The following error occurred while executing this line:
/home/openbravo/src/openbravo/pi/src-db/database/build-create.xml:255: org.postgresql.util.PSQLException: ERROR: ERROR!!!!

No tags attached.
related to defect 0039271 closed alostale PG 11: error when updating database 
blocks feature request 0039270 closed platform support PostgreSQL 11 
diff ad_db_modified_error.diff (395) 2018-09-21 08:16
https://issues.openbravo.com/file_download.php?file_id=12165&type=bug
Issue History
2018-09-20 19:27caristuNew Issue
2018-09-20 19:27caristuAssigned To => platform
2018-09-20 19:27caristuModules => Core
2018-09-20 19:27caristuTriggers an Emergency Pack => No
2018-09-20 19:27caristuIssue generated from0039271
2018-09-20 19:27caristuRelationship addedrelated to 0039271
2018-09-20 19:27caristuRelationship addedblocks 0039270
2018-09-20 19:28caristuDescription Updatedbug_revision_view_page.php?rev_id=17651#r17651
2018-09-21 08:16caristuFile Added: ad_db_modified_error.diff
2018-09-21 08:17caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17653#r17653
2018-09-21 08:17caristuDescription Updatedbug_revision_view_page.php?rev_id=17654#r17654
2018-09-21 08:20caristuSummaryPG 11: ad_db_modified function fails silently => PG 11: ad_db_modified function fails
2018-09-21 08:21caristuDescription Updatedbug_revision_view_page.php?rev_id=17655#r17655
2018-09-21 11:23alostaleStatusnew => scheduled
2018-09-21 11:23alostaleAssigned Toplatform => alostale
2018-09-25 10:04hgbotCheckin
2018-09-25 10:04hgbotNote Added: 0106990
2018-09-25 10:04hgbotStatusscheduled => resolved
2018-09-25 10:04hgbotResolutionopen => fixed
2018-09-25 10:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/462eab118a3bbd84c8493a845ee750a6e61ca2c0 [^]
2018-09-25 10:04hgbotCheckin
2018-09-25 10:04hgbotNote Added: 0106991
2018-09-25 10:05alostaleReview Assigned To => caristu
2018-09-25 11:04hgbotCheckin
2018-09-25 11:04hgbotNote Added: 0106997
2018-09-25 11:25caristuNote Added: 0106999
2018-09-25 11:25caristuStatusresolved => closed
2018-09-25 11:25caristuFixed in Version => 3.0PR18Q4
2018-09-25 20:57hudsonbotCheckin
2018-09-25 20:57hudsonbotNote Added: 0107027
2018-09-25 20:57hudsonbotCheckin
2018-09-25 20:57hudsonbotNote Added: 0107028
2018-09-25 20:57hudsonbotCheckin
2018-09-25 20:57hudsonbotNote Added: 0107031

Notes
(0106990)
hgbot   
2018-09-25 10:04   
Repository: erp/devel/pi
Changeset: 462eab118a3bbd84c8493a845ee750a6e61ca2c0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 21 11:26:50 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/462eab118a3bbd84c8493a845ee750a6e61ca2c0 [^]

fixed bug 39332: PG 11: ad_db_modified function fails

  AD_DB_MODIFIED was failing in PG 11 because it was using pg_proc.proisagg
  column which does no longer exist starting from 11.

  Using that column was unneeded in any case because it was in query to get
  paramaters and it was filtering out functions using them, as those functions
  where already obtained in outer query, it is not needed to filter them again.

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0106991)
hgbot   
2018-09-25 10:04   
Repository: erp/devel/pi
Changeset: 45a672248561d79d4a3f22df7393414e4e71a9c9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Sep 21 11:34:01 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/45a672248561d79d4a3f22df7393414e4e71a9c9 [^]

related to bug 39332: PG 11: ad_db_modified function fails

  Added test cases covering ad_db_modified

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/model/DBModifiedTest.java
---
(0106997)
hgbot   
2018-09-25 11:04   
Repository: erp/devel/pi
Changeset: b378ec3feb5108222b5cbdcfbd3531c71db7a062
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Sep 25 11:04:15 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b378ec3feb5108222b5cbdcfbd3531c71db7a062 [^]

related to issue 39332: Fix typo

---
M src-test/src/org/openbravo/test/model/DBModifiedTest.java
---
(0106999)
caristu   
2018-09-25 11:25   
Code reviewed + tested OK.
(0107027)
hudsonbot   
2018-09-25 20:57   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b69e30e117b8 [^]
Maturity status: Test
(0107028)
hudsonbot   
2018-09-25 20:57   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b69e30e117b8 [^]
Maturity status: Test
(0107031)
hudsonbot   
2018-09-25 20:57   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b69e30e117b8 [^]
Maturity status: Test