Re: Puzzled: CURSOR in Package
Date: Mon, 19 Nov 2001 17:48:25 +0000
Message-ID: <3BF945E9.4F7D_at_yahoo.com>
jane wrote:
>
> In Steve Feuerstein's book on package cursors,
> he talks about declaring cursors in package
> specifications like:
>
> CURSOR my_cur RETURN xxxx ;
>
> and put the SELECT in the body...
>
> but he doesn't say why this "should" be the way.
> Is this just for standard good practice ? What else ?
>
> So what's wrong with fully declaring cursor and putting
> SELECT in the spec ?
> Actually this way one doesn't have
> to deal with the RETURN clause. and you don't have
> the cursor in 2 places.
>
> Your insight is highly appreciated
> thanks
>
> jane
[Quoted] You may want it that way for security reasons - in a similar way to the Oracle supplied packages - the spec is typically readable from DBA_SOURCE but the body is wrapped. Thus, you could publicize the existence of a cursor to be shared, but not reveal its definition.
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Mon Nov 19 2001 - 18:48:25 CET
