Return multiple recordsets from stored procedures
-------------------------------------------------

                 Key: CORE-5440
                 URL: http://tracker.firebirdsql.org/browse/CORE-5440
             Project: Firebird Core
          Issue Type: Bug
          Components: API / Client Library, Engine
    Affects Versions: 3.0.1, 3.0.0, 4.0 Initial
         Environment: Window
            Reporter: morse
            Priority: Critical


Firebird should allow stored procedures to return multiple recordsets. Stored 
procedures are supposed to encapsulate SQL logic and abstract queries but this 
encapsulation is broken in Firebird because now the application has to call 
separate stored procedures for each recordset needed and then combine them at 
the application layer.

All other DBMS support such a feature.

Here is an pseudo example in postgresql:
CREATE FUNCTION get_topics
(
    OUT p_topics REFCURSOR,
    OUT p_users REFCURSOR
)
AS
BEGIN
     OPEN p_topics FOR SELECT * FROM topics;
     OPEN p_users FOR SELECT * FROM users;
END

Here is a pseudo example in TSQL (Mssql):
CREATE PROCEDURE get_topics()
AS
BEGIN
      SELECT * FROM topics;
      SELECT * FROM users;
END

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to