Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0001472 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 00. Application dictionary | minor | always | 2007-06-29 17:31 | 2008-07-08 12:08 | |||
Reporter | jaimetorre | View Status | public | |||||
Assigned To | cromero | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 2.40alpha-r2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0001472: Incorrect default values when Creating From DB in PostgreSQL | |||||||
Description | Description: The process 'Create Columns from DB' doesn't get correct default values for the different data types (in PostgreSQL). For example, in Oracle, the fields 'char(1 byte)' are imported as 'Yes/No' columns. In PostgreSQL, they are imported as 'String' with length -1. The 'Mandatory' check is also incorrectly selected. All these default valules should be revised. Enviroment: OS: Linux DB: PostgreSQL Browser: FF2 Openbravo: 2.31 beta Language: English Steps: 1. Create a table in database. 2. As System Administrator go to 'Application Dictionary > Table and Column' 3. Define a new table in this window. 4. Press the 'Create Columns from DB' button. 5. Navigate to the 'Column' tab and check for each column the fields: length, reference, mandatory, updateable | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0001381) cromero (viewer) 2007-07-04 11:41 edited on: 2008-06-12 09:19 |
Logged In: YES user_id=1500614 Originator: NO It's a problem of our implementation of view USER_TAB_COLUMNS that doesn't exit in Postgre. When the attribute type is varying, PG_ATTRIBUTE.ATTLEN returns -1. We have modified the view in order to return a correct value for that casses. Here is the new code. It will be included in future releases. Carlos Romero Openbravo Team CREATE OR REPLACE VIEW USER_TAB_COLUMNS (TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, DATA_DEFAULT, NULLABLE, COLUMN_ID) AS SELECT UPPER(PG_CLASS.RELNAME), UPPER(PG_ATTRIBUTE.ATTNAME), UPPER(PG_TYPE.TYPNAME), CASE PG_ATTRIBUTE.ATTLEN WHEN -1 THEN PG_ATTRIBUTE.ATTTYPMOD-4 ELSE PG_ATTRIBUTE.ATTLEN END,10, 0, CASE PG_ATTRIBUTE.ATTHASDEF WHEN TRUE THEN(SELECT PG_ATTRDEF.ADSRC FROM PG_ATTRDEF WHERE PG_ATTRDEF.ADRELID = PG_CLASS.OID AND PG_ATTRDEF.ADNUM = PG_ATTRIBUTE.ATTNUM) ELSE NULL END, PG_ATTRIBUTE.ATTNOTNULL, PG_ATTRIBUTE.ATTNUM FROM PG_CLASS, PG_NAMESPACE, PG_ATTRIBUTE, PG_TYPE WHERE PG_ATTRIBUTE.ATTRELID = PG_CLASS.OID AND PG_ATTRIBUTE.ATTTYPID = PG_TYPE.OID AND PG_CLASS.RELNAMESPACE = PG_NAMESPACE.OID AND PG_NAMESPACE.NSPNAME = CURRENT_SCHEMA() AND PG_ATTRIBUTE.ATTNUM>0; |
(0001382) plujan (viewer) 2007-11-06 16:37 edited on: 2008-06-12 09:19 |
Logged In: YES user_id=1759992 Originator: NO This bug seems to be present on R2.35 |
(0001383) cromero (viewer) 2007-11-06 18:14 edited on: 2008-06-12 09:19 |
Logged In: YES user_id=1500614 Originator: NO Correction has been lost in r2.33. We have recovered it and it's now available in SVN repository. Carlos Romero Openbravo Team |
(0005061) user71 2005-06-01 00:00 edited on: 2008-06-12 09:43 |
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis. You can see the original bug report in: https://sourceforge.net/support/tracker.php?aid=1745386 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2008-07-08 12:08 | psarobe | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |