Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040843Openbravo ERPY. DBSourceManagerpublic2019-05-10 16:172019-05-27 17:34
shuehner 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q3 
caristu
Core
No
0040843: update.database "Reading tables..." fails with PG12 -> pg_attrdef.adsrc does not exists
Running update.database against PG12 (devel) fails during 'Reading tables...' step:
     [java] 1144 [main] ERROR org.apache.ddlutils.DatabaseOperationException - ERROR: column pg_attrdef.adsrc does not exist
     [java] Position: 827
     [java] org.postgresql.util.PSQLException: ERROR: column pg_attrdef.adsrc does not exist
     [java] Position: 827

     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readList(ModelLoaderBase.java:813) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readColumns(ModelLoaderBase.java:354) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readTable(ModelLoaderBase.java:322) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.readTable(PostgreSqlModelLoader.java:632) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase$1.getRow(ModelLoaderBase.java:248) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readList(ModelLoaderBase.java:815) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readTables(ModelLoaderBase.java:244) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readDatabase(ModelLoaderBase.java:194) ~[dbsourcemanager.jar:?]
     [java] at org.apache.ddlutils.platform.postgresql.PostgreSqlModelLoader.readDatabase(PostgreSqlModelLoader.java:89) ~[dbsourcemanager.jar:?]
-
No tags attached.
related to defect 0040842 closed alostale Error on create.database with PG12 (prescript views user_constraints + user_tab_columns) use removed attributes 
blocks feature request 0040841 closed shuehner support PostgreSQL 12 
Issue History
2019-05-10 16:17shuehnerNew Issue
2019-05-10 16:17shuehnerAssigned To => platform
2019-05-10 16:17shuehnerModules => Core
2019-05-10 16:17shuehnerTriggers an Emergency Pack => No
2019-05-10 16:17shuehnerRelationship addedblocks 0040841
2019-05-10 16:19shuehnerNote Added: 0111627
2019-05-10 16:36shuehnerRelationship addedrelated to 0040842
2019-05-10 16:36shuehnerNote Added: 0111629
2019-05-13 12:40alostaleAssigned Toplatform => alostale
2019-05-13 12:53alostaleReview Assigned To => caristu
2019-05-13 12:55hgbotCheckin
2019-05-13 12:55hgbotNote Added: 0111639
2019-05-13 12:55hgbotStatusnew => resolved
2019-05-13 12:55hgbotResolutionopen => fixed
2019-05-13 12:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/733f0142d3d64ee215c88b060472a4fecfa61bce [^]
2019-05-13 12:55hgbotCheckin
2019-05-13 12:55hgbotNote Added: 0111641
2019-05-13 12:55hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/733f0142d3d64ee215c88b060472a4fecfa61bce [^] => http://code.openbravo.com/erp/devel/pi/rev/cc303c2e2e097c1aa9e18c2e461fffde54dfd136 [^]
2019-05-21 15:17hudsonbotCheckin
2019-05-21 15:17hudsonbotNote Added: 0112028
2019-05-27 17:33caristuNote Added: 0112181
2019-05-27 17:33caristuStatusresolved => closed
2019-05-27 17:34caristuFixed in Version => 3.0PR19Q3

Notes
(0111627)
shuehner   
2019-05-10 16:19   
As error is in model reading it fails any command needing to read model from database also: i.e. export.database
(0111629)
shuehner   
2019-05-10 16:36   
See related 40842 issue for postgres commit with replacement function
(0111639)
hgbot   
2019-05-13 12:55   
Repository: erp/devel/dbsm-main
Changeset: 733f0142d3d64ee215c88b060472a4fecfa61bce
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 13 12:43:51 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/733f0142d3d64ee215c88b060472a4fecfa61bce [^]

fixed bug 40843: update.database fails with PostgreSQL 12

  It failed because we made use of pg_attrdef.adsrc which was deprecated for a
  long time and has been removed in 12.

  Replaced its use by pg_get_expr which is present in all PG supported versions.

---
M src-test/src/org/openbravo/dbsm/test/model/data/DefaultValuesTest.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
---
(0111641)
hgbot   
2019-05-13 12:55   
Repository: erp/devel/pi
Changeset: cc303c2e2e097c1aa9e18c2e461fffde54dfd136
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon May 13 12:48:05 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cc303c2e2e097c1aa9e18c2e461fffde54dfd136 [^]

fixed bug 40843: update.database fails with PostgreSQL 12

  It failed because we made use of pg_attrdef.adsrc which was deprecated for a
  long time and has been removed in 12.

  Replaced its use by pg_get_expr which is present in all PG supported versions.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0112028)
hudsonbot   
2019-05-21 15:17   
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/9b8f37d9d85e [^]
Maturity status: Test
(0112181)
caristu   
2019-05-27 17:33   
Code reviewed + tested OK.