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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037318
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] Z. Othersminoralways2017-11-17 10:302024-05-28 10:45
Reporterjainsapna581View Statuspublic 
Assigned ToTriage Platform Base 
PriorityurgentResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSWindowsDatabasePostgreSQLJava version8
OS Version7Database version9.3Ant version1.9.7
Product Version3.0PR17Q1.1SCM revision 
Review Assigned To
Web browserGoogle Chrome
ModulesMy Openbravo Tab
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037318: function which returns table

DescriptionWe are creating a function which returns table and able to export and package it in functional state. But when we install this module, we get below error for the procedure and procedure does not get created.

[java] 55489 WARN - SQL Command failed with: ERROR: cannot use RETURN QUERY in a non-SETOF function
[java] Position: 1596
[java] 55497 WARN - -- END
[java] -- -----------------------------------------------------------------------
[java] -- FUNCTION API_GETDATA
[java] -- -----------------------------------------------------------------
[java] CREATE OR REPLACE FUNCTION API_GETDATA(pcs OUT NUMERIC, quantity OUT NUMERIC)
[java]

Is there any way or alternative for such procedures where we need to return a table from procedures
Steps To Reproduce1. Create the below function

CREATE OR REPLACE FUNCTION api_getdata()
  RETURNS TABLE(pcs integer, quantity integer) AS
$BODY$
/******************************************************************************/
BEGIN
  RETURN QUERY select count(*) as pcs,round(qtyonhand,2) as quantity
from api_data;
END ; $BODY$
  LANGUAGE plpgsql VOLATILE


2. package it and install in other environment
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes feature request 0052297 newTriage Platform Base Add SETOF return value 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-11-17 10:30 jainsapna581 New Issue
2017-11-17 10:30 jainsapna581 Assigned To => Triage Finance
2017-11-17 10:30 jainsapna581 Web browser => Google Chrome
2017-11-17 10:30 jainsapna581 Modules => My Openbravo Tab
2017-11-17 10:30 jainsapna581 Regression level => Packaging and release
2017-11-17 10:30 jainsapna581 Triggers an Emergency Pack => No
2023-04-29 01:33 axelmercado Relationship added causes 0052297
2023-05-02 09:24 aferraz Assigned To Triage Omni OMS => Triage Platform Base
2024-05-08 12:50 alostale Web browser Google Chrome => Google Chrome
2024-05-08 12:50 alostale Severity critical => minor
2024-05-08 12:50 alostale Type defect => feature request
2024-05-28 10:45 alostale Web browser Google Chrome => Google Chrome
2024-05-28 10:45 alostale Regression level Packaging and release =>


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker