Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016334Openbravo ERPY. DBSourceManagerpublic2011-03-01 10:182011-03-17 00:00
alostale 
marvintm 
urgentmajorhave not tried
closedfixed 
5
 
3.0RC5 
Core
No
0016334: PG: Not possible to change function signature
In a PG DB. Having a module installed with a PL function, it is not possible to update this module if it changes that function's signature.

This is the error got in update.database process:

SQL Command failed with: ERROR: cannot change return type of existing function
Old function should be dropped before trying to create new one.
No tags attached.
Issue History
2011-03-16 15:45marvintmTypedefect => backport
2011-03-16 15:45marvintmfix_in_branch => 2.50
2011-03-16 18:10marvintmTypebackport => defect
2011-03-16 18:10marvintmTarget Version => 3.0RC5
2011-03-16 18:10marvintmfix_in_branch2.50 =>
2011-03-16 18:17hgbotCheckin
2011-03-16 18:17hgbotNote Added: 0034951
2011-03-16 18:17hgbotStatusscheduled => resolved
2011-03-16 18:17hgbotResolutionopen => fixed
2011-03-16 18:17hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/1e390dd8d3994be8f82913ea015aeab79a3c8aad [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/ed4117dbc2a9eb9fce8c80b03deda2040aae51d4 [^]
2011-03-16 18:17hgbotCheckin
2011-03-16 18:17hgbotNote Added: 0034954
2011-03-16 18:17hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/ed4117dbc2a9eb9fce8c80b03deda2040aae51d4 [^] => http://code.openbravo.com/erp/devel/pi/rev/8f593389661dc9a2724ad64d3e25594165373c2d [^]
2011-03-16 18:19hgbotCheckin
2011-03-16 18:19hgbotNote Added: 0034959
2011-03-16 18:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/8f593389661dc9a2724ad64d3e25594165373c2d [^] => http://code.openbravo.com/erp/stable/2.50/rev/437a06f270a020cbcdcdd1a5b93c0ae2f52ce487 [^]
2011-03-16 18:21marvintmNote Added: 0034961
2011-03-16 18:40shuehnerNote Added: 0034962
2011-03-16 18:40shuehnerStatusresolved => closed
2011-03-17 00:00anonymoussf_bug_id0 => 3217703

Notes
(0034951)
hgbot   
2011-03-16 18:17   
Repository: erp/devel/dbsm-main
Changeset: ed4117dbc2a9eb9fce8c80b03deda2040aae51d4
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Mar 16 18:12:39 2011 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/ed4117dbc2a9eb9fce8c80b03deda2040aae51d4 [^]

Fixed issue 16334. Views will be dropped before functions are dropped

---
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
(0034954)
hgbot   
2011-03-16 18:17   
Repository: erp/devel/pi
Changeset: 8f593389661dc9a2724ad64d3e25594165373c2d
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Mar 16 18:15:40 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8f593389661dc9a2724ad64d3e25594165373c2d [^]

Fixed issue 16331. Fixed issue 16329. Fixed issue 16334.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0034959)
hgbot   
2011-03-16 18:19   
Repository: erp/stable/2.50
Changeset: 437a06f270a020cbcdcdd1a5b93c0ae2f52ce487
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Mar 16 18:18:33 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/437a06f270a020cbcdcdd1a5b93c0ae2f52ce487 [^]

Fixed issue 16331. Fixed issue 16329. Fixed issue 16334.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0034961)
marvintm   
2011-03-16 18:21   
The initial change was:

https://code.openbravo.com/erp/devel/dbsm-main/rev/ee9961cbd2e3 [^]

This change had problems because functions were dropped before views.
(0034962)
shuehner   
2011-03-16 18:40   
Tested with update from 2.50MP0 on postgres & oracle to latest main (rev: 42cb4c157d3e). and also changing a function header of an existing function to test that the new drop+create logic fixes that issue.
For the logging change to only report forced command if they still fail after the forced command loop partially tested in the 2.50 -> main/tip update. And the fails always tested via creating a broken view definition.