Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014642
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2010-09-22 09:222010-10-30 11:24
ReporterjpabloaeView Statuspublic 
Assigned Tomarvintm 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiond6f404defcf2
ProjectionnoneETAnoneTarget Version3.0RC3
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_21
OS Version2.6.34Database version9.0Ant version1.7.1
Product VersionmainSCM revisiond7c675d41460 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0014642: PostgreSQL 9.0 support: replace pg_trigger.tgisconstraint

Descriptionpg_trigger.tgisconstraint has been removed from PostgreSQL 9.0. This makes the install.source to throw this error:

create.database.all:
Database connection: jdbc:postgresql://localhost:5433/exp_full_pgsql9. [^] User: exp_full_pgsql9
Executing default prescript
SQL Command failed with: ERROR: column pg_trigger.tgisconstraint does not exist
-- END

CREATE OR REPLACE VIEW USER_OBJECTS
(TABLE_NAME, OBJECT_NAME, OBJECT_ID, OBJECT_TYPE, STATUS)
AS
SELECT UPPER(PG_CLASS.RELNAME), UPPER(PG_TRIGGER.TGNAME), PG_TRIGGER.TGFOID, TO_CHAR('TRIGGER'), CASE is_Trigger_Enabled(PG_TRIGGER.TGNAME) WHEN TRUE THEN TO_CHAR('VALID') ELSE TO_CHAR('INVALID') END
FROM PG_TRIGGER, PG_NAMESPACE, PG_CLASS
WHERE PG_TRIGGER.TGRELID = PG_CLASS.OID
AND PG_TRIGGER.TGISCONSTRAINT = FALSE
AND PG_CLASS.RELNAMESPACE = PG_NAMESPACE.OID
AND PG_NAMESPACE.NSPNAME = CURRENT_SCHEMA()
Executed 116 SQL command(s) with 1 error(s)

See http://builds.openbravo.com/job/exp-full-pgsql9/3/console [^] for the complete console output.

As we intend to support it for 3.0, we should ideally find a way of checking this so that it works in 8.3, 8.4 and 9.0 at the same time.

Some additional information from http://www.postgresql.org/community/weeklynews/pwn20100117: [^]

"(...) I also replaced the tgisconstraint column with tgisinternal; the old meaning of tgisconstraint can now be had by testing for nonzero tgconstraint, while there is no other way to get the old meaning of nonzero tgconstraint, namely that the trigger was internally generated rather than being user-created. (...)"
Tagspostgresql9-support
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0022286 closedAugustoMauch Remove view user_objects (again) as it is unused and is causing trouble when upgrading from pgsql8.4 to >= pgsql9 

-  Notes
(0031353)
hgbot (developer)
2010-09-24 15:35

Repository: erp/devel/pi
Changeset: d6f404defcf2da5444e4dd71d81f981de9a8db1c
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Sep 24 15:33:32 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d6f404defcf2da5444e4dd71d81f981de9a8db1c [^]

Fixed issue 14642. Removed the view so that the Openbravo full build works in PostgreSQL 9.0

---
M src-db/database/model/prescript-PostgreSql.sql
---
(0031405)
hgbot (developer)
2010-09-28 11:10

Repository: erp/devel/pi
Changeset: f6316be65fe77b292d63ec79d32bace38cebf0a7
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Sep 28 11:09:22 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f6316be65fe77b292d63ec79d32bace38cebf0a7 [^]

Related to issue 14642. Readded the view so that ad_script_disable/enable_triggers still work, but with a small change so that it works in PostgreSQL 8.4 and 9.0

---
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/model/prescript-PostgreSql.sql
---
(0031465)
hudsonbot (developer)
2010-09-29 11:57

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/d6f404defcf2 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/51c2c2967221 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18452.obx [^]
(0031470)
hudsonbot (developer)
2010-09-29 11:57

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/f6316be65fe7 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/51c2c2967221 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18452.obx [^]
(0032249)
shuehner (administrator)
2010-10-27 11:18

Reviewed & tested.
Testing using delete client process which is the only one which uses this changed view on postgres. Working fine on pgsql8.4.5 and pgsql9.0.1.
New view definition does remove two columns from the view which where not used and as this view is not part of the official api there's no api problem because of that change.

- Issue History
Date Modified Username Field Change
2010-09-22 09:22 jpabloae New Issue
2010-09-22 09:22 jpabloae Assigned To => marvintm
2010-09-22 09:22 jpabloae Issue Monitored: shuehner
2010-09-22 09:23 jpabloae Tag Attached: postgresql9-support
2010-09-24 15:35 hgbot Checkin
2010-09-24 15:35 hgbot Note Added: 0031353
2010-09-24 15:35 hgbot Status new => resolved
2010-09-24 15:35 hgbot Resolution open => fixed
2010-09-24 15:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d6f404defcf2da5444e4dd71d81f981de9a8db1c [^]
2010-09-28 11:10 hgbot Checkin
2010-09-28 11:10 hgbot Note Added: 0031405
2010-09-29 11:57 hudsonbot Checkin
2010-09-29 11:57 hudsonbot Note Added: 0031465
2010-09-29 11:57 hudsonbot Checkin
2010-09-29 11:57 hudsonbot Note Added: 0031470
2010-10-27 11:18 shuehner Note Added: 0032249
2010-10-27 11:18 shuehner Status resolved => closed
2010-10-30 11:24 anonymous sf_bug_id 0 => 3098734
2012-11-13 15:03 shuehner Relationship added related to 0022286


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker