How to make a call of the same name of the stored procedure within a  
package from the global namespace?

Example:
===========================================

SET TERM ^;

CREATE OR ALTER PROCEDURE PROC1
returns (i int)
AS
begin
   i = 5;
   suspend;
end^

CREATE OR ALTER PACKAGE PKG2
AS
begin
   procedure proc1
   returns (i int);
end^

RECREATE PACKAGE BODY PKG2
AS
begin
   procedure proc1
   returns (i int)
   as
   begin
     i = 3;
     suspend;
     i = 4;
     suspend;
   end
end^

CREATE OR ALTER PACKAGE PKG1
AS
begin
   procedure proc1
   returns (i int);

   procedure proc2
   returns (name varchar(31), i int);
end^

RECREATE PACKAGE BODY PKG1
AS
begin

   procedure proc1
   returns (i int)
   as
   begin
     i = 1;
     suspend;
     i = 2;
     suspend;
   end

   procedure proc2
   returns (name varchar(31), i int)
   as
   begin
     /* pkg1.proc1 */
     name = 'pkg1.proc1';
     for select i
         from proc1
         into :i
     do
       suspend;

     /* pkg2.proc1 */
     name = 'pkg2.proc1';
     for select i
         from pkg2.proc1
         into :i
     do
       suspend;

     /* Global proc1 How? */
   end
end^

SET TERM ;^

select *
 from pkg1.proc2;
============================================

If Firebird allows you to create procedures and functions with the same  
name inside the package and in the global space, it should be allowed to  
call such procedures from the package. Can add a new keyword for such  
cases? What do you think?

Thank you for your attention.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to