dbTalk Databases Forums  

global namespace qualifier for function?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss global namespace qualifier for function? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mh@pixar.com
 
Posts: n/a

Default global namespace qualifier for function? - 07-05-2009 , 06:55 PM






How do I qualify a function or procedure call to indicate that it
should be at global scope? I have my own scn_to_timestamp()
in a package that needs to call the default global function of
the same name.

Many TIA!
Mark

create or replace package px as
function scn_to_timestamp(scn number) return timestamp;
end px;

create or replace package body px as
function scn_to_timestamp(scn number) return timestamp is
begin
-- how do I qualify this to refer to the global function?
return scn_to_timestamp(scn);
end;
end px;

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #2  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: global namespace qualifier for function? - 07-05-2009 , 07:25 PM






mh (AT) pixar (DOT) com schrieb:
Quote:
How do I qualify a function or procedure call to indicate that it
should be at global scope? I have my own scn_to_timestamp()
in a package that needs to call the default global function of
the same name.

Many TIA!
Mark

create or replace package px as
function scn_to_timestamp(scn number) return timestamp;
end px;

create or replace package body px as
function scn_to_timestamp(scn number) return timestamp is
begin
-- how do I qualify this to refer to the global function?
return scn_to_timestamp(scn);
end;
end px;

return sys.scn_to_timestamp(scn);

But what is the purpose of such wrapper?

Best regards

Maxim

--
Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?

Aksel Peter Jørgensen

Reply With Quote
  #3  
Old   
mh@pixar.com
 
Posts: n/a

Default Re: global namespace qualifier for function? - 07-05-2009 , 07:39 PM



Maxim Demenko <mdemenko (AT) gmail (DOT) com> wrote:
Quote:
return sys.scn_to_timestamp(scn);
ah, perfect, thanks!

Quote:
But what is the purpose of such wrapper?
I have an hourly cron job that captures the current time and
scn to a table. So, if the requested scn is out of the range
of the current system logs, I can look up the requested time
in my table.

It's quite nice, we can see the update times of records for
as far back as we have the recorded timestamps.

Thanks again,
Mark

--
Mark Harrison
Pixar Animation Studios

Reply With Quote
  #4  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: global namespace qualifier for function? - 07-06-2009 , 04:33 PM



On Mon, 06 Jul 2009 00:39:01 GMT, mh (AT) pixar (DOT) com wrote:

Quote:
I have an hourly cron job that captures the current time and
scn to a table.
Sigh...
Some people will never learn.
Your system must be glued together by 100 percent of crap and bullshit
solutions.
Luckily I'm not the consultant, who needs to clean out the mess in the
near future.

--

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.