Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022286Openbravo ERPA. Platformpublic2012-11-13 14:532012-11-21 06:06
shuehner 
AugustoMauch 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP17 
marvintm
Core
No
0022286: Remove view user_objects (again) as it is unused and is causing trouble when upgrading from pgsql8.4 to >= pgsql9
The view user_objects exists as a system view on oracle and is created in the prescript on postgresql.

That view is no longer used since some time by any code in pi. The last user was the old implementation of delete-client which was removed from pi on 2011-09-27.

In issue 14642 that view was made compatible with PostgreSQL >= 9.0 which was needed as some internal postgres detail needed by that view changed between 8.4 and 9.1

That made the ERP already install fine on postgresql >9.0

However when doing a pg_dump of the database on pgsql8.4 and trying to import that dump on pgsql >= 9.0 an error is still raised as that view with the 8.4 definition cannot be imported into a 9.1 server.

As the view is no longer needed it should just be removed to allow easier upgrade to pgsql9.1 without showing any harmless but ugly error messages which will confuse users.

Note the same (deleting the view) was already tried in issue 14642 first, but back then needed to be backed out as the old delete client code still used that view, however that is no longer the case for over a year now, so that blocker does not apply.
run install.source on top of pgsql8.4
run a pg_dump -Fc of that database
run pg_restore of that dump against a pgsql9.1 server
Notice that the user_objects view fails to be created and an error message about this is shown.
Delete the user_object view completely.

No tags attached.
related to defect 00146423.0RC3 closed marvintm PostgreSQL 9.0 support: replace pg_trigger.tgisconstraint 
Issue History
2012-11-13 14:53shuehnerNew Issue
2012-11-13 14:53shuehnerAssigned To => AugustoMauch
2012-11-13 14:53shuehnerModules => Core
2012-11-13 15:03shuehnerRelationship addedrelated to 0014642
2012-11-13 18:45hgbotCheckin
2012-11-13 18:45hgbotNote Added: 0054214
2012-11-13 18:45hgbotStatusnew => resolved
2012-11-13 18:45hgbotResolutionopen => fixed
2012-11-13 18:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/988b9a459b0262154ab083e85755b0471ed0105c [^]
2012-11-14 12:24marvintmReview Assigned To => marvintm
2012-11-14 12:24marvintmStatusresolved => closed
2012-11-14 12:24marvintmFixed in Version => 3.0MP17
2012-11-21 06:06hudsonbotCheckin
2012-11-21 06:06hudsonbotNote Added: 0054377

Notes
(0054214)
hgbot   
2012-11-13 18:45   
Repository: erp/devel/pi
Changeset: 988b9a459b0262154ab083e85755b0471ed0105c
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Tue Nov 13 15:01:21 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/988b9a459b0262154ab083e85755b0471ed0105c [^]

Fixed 22286. Remove unused user_objects view from prescript-postgresql
That view is no longer used as the last user the old delete client code
has been rewritten some time ago.
As that view is creating problem when upgrading from pgsql8.4 -> pgsql9.1
it is removed in this commit.

---
M src-db/database/model/excludeFilter.xml
M src-db/database/model/prescript-PostgreSql.sql
---
(0054377)
hudsonbot   
2012-11-21 06:06   
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/c3c5e61b0164 [^]

Maturity status: Test