Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Package Cursor Question

Re: Package Cursor Question

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Fri, 28 Mar 2003 08:26:50 -0800
Message-ID: <3E8477C9.75A8314C@exxesolutions.com>


E Richard Leiman & Eva wrote:

> Dear Daniel,
>
> Hi.
>
> No, it was not to populate a block with a ref cursor.
>
> It's my guess that the cursor in the package can only be called from a
> procedure, or function in that package.
>
> Can you tell me if there is an advantage to creating the cursor as shown in
> the book, or simply creating a cursor in the global area of the package?
>
> > If I understand where you are heading it can not be done. If the intent is
> to
> > populate a datablock use a REF CURSOR as the OUT parameter from a
> procedure.
> >
> > Daniel Morgan
> >
> >

Where a cursor is defined bears on two things ... scope and security.

If you define it in a procedure it is only visible within that procedure. If you define it in the package header it is available globally ... with obvious security implications.

I would consider it most likely a case of bad design to define a cursor in a package header. Leaving open the possibility that some specific design might make it useful.

Daniel Morgan Received on Fri Mar 28 2003 - 10:26:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US