Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0033997 | Openbravo ERP | Y. DBSourceManager | public | 2016-09-15 01:11 | 2016-12-16 18:39 |
Reporter | chelipf | ||||
Assigned To | caristu | ||||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 30 | OS Version | Ubuntu 16.04 | |
Product Version | 3.0PR16Q3.1 | ||||
Target Version | Fixed in Version | 3.0PR17Q1 | |||
Merge Request Status | |||||
Review Assigned To | alostale | ||||
OBNetwork customer | |||||
Web browser | Mozilla Firefox | ||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0033997: dbsourcemanager export double precision as precision and impossible to cast in views | ||||
Description | CASE WHEN date_part('day', to_date(po.date_order)) > to_number(org.em_rh_day) THEN ... anything ... ELSE ... anything ... END 1) The problem is that date_part (the same occurs for extract function) returns 'double precision' then postgresql cast (to_number(org.em_rh_day)) as "double precision" (to_number(org.em_rh_day)::double precision) but it is exported like this CASE WHEN date_part('day', to_date(po.date_order)) > to_number(org.em_rh_day) precision THEN ... ... Note: take attention to the literal "precion" next to to_number(org.em_rh_day) It is only set as precision, that in consecuense produces an error when updating database. 2)If I cast the extract or date_part by hand like this cast(extract(DAY FROM to_date(po.fecha_papeleta)) AS NUMERIC) That works, but when exported it gets ignored, that means when update.database is exected again it recreates de db without the cast and in consecuense in the next export.database it gets double precision again but like in point 1 | ||||
Steps To Reproduce | Create a view with this code: CASE WHEN date_part('day', to_date(po.date_order)) > to_number(org.em_rh_day) THEN ... anything ... ELSE ... anything ... END AS name_of_column After that, export.database and update.database twice. | ||||
Proposed Solution | export.database must cast double precision as TO_NUMBER (numeric in postgresql) or fix the only precision literal when exporting | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-09-15 01:11 | chelipf | New Issue | |||
2016-09-15 01:11 | chelipf | Assigned To | => platform | ||
2016-09-15 01:11 | chelipf | Web browser | => Mozilla Firefox | ||
2016-09-15 01:11 | chelipf | Modules | => Core | ||
2016-09-15 01:11 | chelipf | Triggers an Emergency Pack | => No | ||
2016-09-15 01:55 | chelipf | Note Added: 0089962 | |||
2016-09-29 09:16 | alostale | Status | new => acknowledged | ||
2016-12-01 13:25 | alostale | Priority | high => urgent | ||
2016-12-01 14:12 | alostale | Assigned To | platform => caristu | ||
2016-12-02 15:22 | hgbot | Checkin | |||
2016-12-02 15:22 | hgbot | Note Added: 0092042 | |||
2016-12-02 15:22 | hgbot | Status | acknowledged => resolved | ||
2016-12-02 15:22 | hgbot | Resolution | open => fixed | ||
2016-12-02 15:22 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/7267d3ff1a33ab4631f70cec9da0f2e432d8a707 [^] | ||
2016-12-02 15:33 | hgbot | Checkin | |||
2016-12-02 15:33 | hgbot | Note Added: 0092043 | |||
2016-12-02 15:34 | caristu | Review Assigned To | => alostale | ||
2016-12-02 15:34 | caristu | Web browser | Mozilla Firefox => Mozilla Firefox | ||
2016-12-13 11:53 | alostale | Note Added: 0092310 | |||
2016-12-13 11:53 | alostale | Status | resolved => closed | ||
2016-12-13 11:53 | alostale | Fixed in Version | => 3.0PR17Q1 | ||
2016-12-16 18:39 | hudsonbot | Checkin | |||
2016-12-16 18:39 | hudsonbot | Note Added: 0092687 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|