Thursday, 26 May 2016

A generator for pipelined functions

One of the options for solving performance issues is the use of pipelined functions. The performance of queries can in some cases be improved dramatically by the use of PL/SQL instead of pure SQL.
The setup of pipelined functions requires however the creation of two object types for the return values and a function in which these object type are filled with values. There is a lot of typing before you can start to create the actual logic.
For this purpose the Oracle Pipelined Function Generator is created. With this tool you can generate a skeleton for the pipelined function with the required types. You can start coding the logic immediately!
The basis of the generation is a table definition with column names and data types. A script for the following objects is generated :
  • the pipelined function in a package with a query based on the table definition
  • the view to encapsulate the pipelined function

In answer to the comment of Denes the separate types have been replaced by types declared within a package

If your pipelined functions recieves parameters you can use the technique with package variables that is described in another blogpost.
The online generation of the objects is available here:

Happy coding,
Dick Dral

PS This generator is an overhauled version of my old generator. The formatting of the create script has been improved, the application's theme is changed to UT and a Copy to Clipboard button has been added.


  1. Dick,

    why not using definition of the type in the package. Creating standalone types is fine but you have objects out there you often forget.


  2. Hi Denes,

    that is a very good idea. I will incorporate it in the next version.


  3. Dick,
    This is one great idea! Good job!
    I always hated all the typing..


  4. Hi Dick,

    Very sweet tool. Nicely done.

    Patrick Cimolini

  5. It's a great tool. It would be nice to improvise this to parallel pipelined function and the return value is table type. They have more use cases where it needs massive performance improvement


  6. I love this tool and I have used it many times in the past. Is this available via github, I would like to make a few customizations. If it is awesome, if it isn't I understand and thank you for makeing this available to the oracle World !!
    You rock.