Unix Technical Forum

What to put in package specifications

This is a discussion on What to put in package specifications within the Oracle Miscellaneous forums, part of the Oracle Database category; --> It's a given that public procedures and functions are declared in the package specification. But what general rule of ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 10:28 AM
Dereck L. Dietz
 
Posts: n/a
Default What to put in package specifications

It's a given that public procedures and functions are declared in the
package specification. But what general rule of thumb, if any, is used to
decide whether an object such as a cursor should be put in the package
specification or declared in the procedure itself in the package body?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 10:28 AM
Jim Kennedy
 
Posts: n/a
Default Re: What to put in package specifications


"Dereck L. Dietz" <dietzdl@ameritech.net> wrote in message
news:VCs9g.86466$dW3.312@newssvr21.news.prodigy.co m...
> It's a given that public procedures and functions are declared in the
> package specification. But what general rule of thumb, if any, is used to
> decide whether an object such as a cursor should be put in the package
> specification or declared in the procedure itself in the package body?
>
>

Use normal scoping rules. Where do you want the object visible? Inside the
procedure only or global to all procedures?
Jim


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 10:28 AM
Mark D Powell
 
Posts: n/a
Default Re: What to put in package specifications

Another way of phrasing Jim's response guidence would be to ask, "where
do I need to reference this from?"

PL/SQL tables, record types, collections, and reference cursors that
you want to pass to or from the package to other stored routines or
external programs are canidates for being defined in the package
specification.

HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:31 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com