Home » SQL & PL/SQL » SQL & PL/SQL » PIPE ROW (Oracle, 12.2, Unix)
PIPE ROW [message #686344] Thu, 04 August 2022 07:15 Go to next message
Duane
Messages: 484
Registered: December 2002
Senior Member
I'm pretty sure I know the answer but I thought I would ask anyway just to confirm.

Using a function that is PIPELINED (with PIPE ROW) doesn't have anything to do with using DBMS_PIPE? I only ask because I have a function that is PIPELINED and our DBA was questioning if it used the older DBMS_PIPE functionality. Everything is moving to Oracle Advanced Queuing so that's why he asked. If, by chance it does, then he doesn't want me to use the PIPLINED function.


function UnZipFile (DirectoryName varchar2, 
                    ZipFileName   varchar2) return UnZipFileNameList pipelined is
    
  ZipFile UnZipFileNameList;
    
  begin
    ZipFile := UnZipGetFileList(DirectoryName, ZipFileName);
    
    for i in ZipFile.first..ZipFile.last
      loop
        pipe row(ZipFile(i));
      end loop;
  
    return;
  
  exception
    when others
      then
        raise;
  
  end;

Re: PIPE ROW [message #686345 is a reply to message #686344] Thu, 04 August 2022 08:17 Go to previous message
Michel Cadot
Messages: 68258
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

No relation between the two.

And that:
  exception
    when others
      then
        raise;
  end;
I think it should be changed to:
  exception
    when others
      then
        begin raise;
    exception
    when others
      then
        begin raise;
    exception
    when others
      then
        begin raise;
    exception
    when others
      then
        raise;
  end; 
  end;
  end;
  end;
Read WHEN OTHERS.
Previous Topic: Audit Database Problem
Next Topic: trigger not update the column
Goto Forum:
  


Current Time: Fri Aug 12 19:33:28 CDT 2022