Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011971Openbravo ERPA. Platformpublic2010-01-14 19:002010-04-19 21:11
iciordia 
marvintm 
urgentminoralways
closedfixed 
5any
pi 
2.50MP15 
Core
No
0011971: Exporting a PL/Sql object in a postgreSql database and importing it results in a different object
When DBSourceManager reads database objects in a postgresql database it modifies the code to make it compatible with oracle. Then, when importing into a postgresql database, the system modify back the code (do changes in opposite manner) to get the original code.

But not all pl/sql code in postgresql is supported. In some cases this transformation fail and the result after export/import is diferent from the original, without any warning from the system.
Running Openbravo in a postgresql database, create a new function with return type TABLE (RETURNS TABLE). Export it using ant export.database. Then import it using ant update.database -> the result is that return type of the function is removed.
When DBSourceManager exports a pl/sql object in a postgresql database, perform the following validation: apply transformation back to the exported code and compare it with the original object (both should be identical but blank spaces and upper/lower case differences)
No tags attached.
Issue History
2010-01-14 19:00iciordiaNew Issue
2010-01-14 19:00iciordiaAssigned To => marvintm
2010-01-14 19:01iciordiaStatusnew => scheduled
2010-01-14 19:01iciordiafix_in_branch => pi
2010-03-08 16:06jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-03-15 10:03marvintmTarget Version2.50MP14 =>
2010-03-15 10:03marvintmfix_in_branchpi =>
2010-03-23 16:18hgbotCheckin
2010-03-23 16:18hgbotNote Added: 0025675
2010-03-23 16:18hgbotStatusscheduled => resolved
2010-03-23 16:18hgbotResolutionopen => fixed
2010-03-23 16:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6729e5065a3c1e8a33df7b583cd760ab9f5b7bae [^]
2010-03-23 18:55hgbotCheckin
2010-03-23 18:55hgbotNote Added: 0025685
2010-03-24 10:06hgbotCheckin
2010-03-24 10:06hgbotNote Added: 0025696
2010-04-12 16:27shuehnerNote Added: 0026069
2010-04-12 16:27shuehnerStatusresolved => closed
2010-04-12 16:27shuehnerFixed in Version => 2.50MP15
2010-04-13 00:00anonymoussf_bug_id0 => 2986149
2010-04-19 21:10hudsonbotCheckin
2010-04-19 21:10hudsonbotNote Added: 0026373
2010-04-19 21:11hudsonbotCheckin
2010-04-19 21:11hudsonbotNote Added: 0026374
2010-04-19 21:11hudsonbotCheckin
2010-04-19 21:11hudsonbotNote Added: 0026378

Notes
(0025675)
hgbot   
2010-03-23 16:18   
Repository: erp/devel/pi
Changeset: 6729e5065a3c1e8a33df7b583cd760ab9f5b7bae
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Mar 23 16:25:23 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6729e5065a3c1e8a33df7b583cd760ab9f5b7bae [^]

Fixed issue 11971. A check will be done to verify that the exported functions and triggers will not change when imported again in PostgreSQL. A warning will be given in case some of the objects do not comply with this check.

---
M src-db/database/build.xml
M src-db/database/lib/dbsourcemanager.jar
---
(0025685)
hgbot   
2010-03-23 18:55   
Repository: erp/devel/pi
Changeset: 3725f0e49097b08b46d5c73cfa69daebe589f00a
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Mar 23 19:02:17 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3725f0e49097b08b46d5c73cfa69daebe589f00a [^]

Related to issue 11971. Added the checkTranslationConsistency property to the main build.xml

---
M build.xml
---
(0025696)
hgbot   
2010-03-24 10:06   
Repository: erp/devel/pi
Changeset: f7108cede5435be7e8329f9136a4839366ad3ef0
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Mar 24 10:15:00 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f7108cede5435be7e8329f9136a4839366ad3ef0 [^]

Related to issue 11971. Improved the log: now a diff of the two versions of the function or trigger will be shown, so that the developer knows more precisely what he needs to fix.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0026069)
shuehner   
2010-04-12 16:27   
Tested in pi on both oracle/postgres. Having database code without any consistency issues the export works as before. Introducing some code into the postgres-db which cannot be properly translated to xml and back to pgsql, or code on oracle which cannot be properly translated to postgres raise a warning in the export.database output, which shows the function name and a short diff of the change which would happen.
However only the warning is shown and the export.db continues (as planned).

-> Closing as working fine.
(0026373)
hudsonbot   
2010-04-19 21:10   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/6729e5065a3c [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]
(0026374)
hudsonbot   
2010-04-19 21:11   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/3725f0e49097 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]
(0026378)
hudsonbot   
2010-04-19 21:11   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/f7108cede543 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]