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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046240
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2021-04-09 14:442022-02-01 07:24
ReportermtaalView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046240: dbsourcemanager export database model does not support postgresql typecasting

DescriptionIn postgresql you can do things like this:
 WHERE dt.date_actual > (now() - '2 years'::interval)

When using this in a materialized view and exporting it through the reporting server export action (which uses dbsourcemanager) it removes the '::interval' causing incorrect sql to be stored in our source code repos.

We have to manually repair the sql before pushing.

I saw the same with other type casting. This can also give trouble when calling postgresql functions as without type inference the function is not recognized.



Steps To ReproduceA simple example mv which would go wrong. Not sure if the dbsourcemanager out of the box exports materialized views.

-- DROP MATERIALIZED VIEW public.m_test_export;

CREATE MATERIALIZED VIEW public.m_test_export
TABLESPACE pg_default
AS
 SELECT o.ad_org_id
   FROM c_order o
  WHERE o.created > (now() - '2 years'::interval)
WITH NO DATA;

ALTER TABLE public.m_test_export
    OWNER TO tad;
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2021-04-09 14:44 mtaal New Issue
2021-04-09 14:44 mtaal Assigned To => platform
2021-04-09 14:44 mtaal Modules => Core
2021-04-09 14:44 mtaal Triggers an Emergency Pack => No
2022-02-01 07:24 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker