Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022875Openbravo ERPY. DBSourceManagerpublic2013-01-23 16:552013-01-23 23:35
ioritzCia 
marvintm 
normalmajorhave not tried
newopen 
20Ubuntu 10.04
 
 
Core
No
0022875: Translations from Oracle to PostgreSQL is not supported for some cursor declarations.
Depending the way a cursor is declared in a database function/procedure, DBSourceManager does not handle the translation. The syntax not supported is the following one:

  Cur_Something RECORD; --> in Oracle
  DECLARE Cur_Something REFCURSOR; --> in PostgreSQL

If the cursor is going to be opened with the following sentence in both languages:

  OPEN Cur_Something FOR SELECT whatever FROM wherever ...;

This is related with issue 22086. There is a slow LOOP structure cursor there that can be improved using separate cursors with the previous structure. The proposed solution in that issue does not work because LOOP cursor types fail in PostgreSQL while opening them twice recursively giving an error that says that it is not possible to open an already opened cursor.

For other cursor declarations <Cur_Something RECORD;> is the right way to do declare a cursor, but for the ones explained previously PostgreSQL requires <DECLARE Cur_Something REFCURSOR;> and Oracle <Cur_Something RECORD;>
Follow the description.
No tags attached.
blocks design defect 0022086 new ioritzCia M_INOUT_POST are using an OR in a CURSOR so the query is doing a Full Table Scan which has a very big impact in performance 
Issue History
2013-01-23 16:55ioritzCiaNew Issue
2013-01-23 16:55ioritzCiaAssigned To => marvintm
2013-01-23 16:55ioritzCiaModules => Core
2013-01-23 16:55ioritzCiaTriggers an Emergency Pack => No
2013-01-23 16:55ioritzCiaRelationship addedblocks 0022086
2013-01-23 23:35shuehnerIssue Monitored: shuehner

There are no notes attached to this issue.