Re: Problems with getting inet_addr via PL/SQL

From: Luis Cabral <cabral_at_merconet.com.br>
Date: 1997/12/24
Message-ID: <01bd0fdf$ff625540$LocalHost_at_lcdc>#1/1


Hi Sergey,

> I have a problem. I need get a long int which is a representation of IP
> address.
> Of course, it can be done via simple PL/SQL.
> For instance, '195.209.67.7' - is a string. We find a first part of
 address
> '195' - multiply it on 2^24, find second part, multiply on 2^16, third -
> multiply on 2^8, fourth and add all results.
> But this case is slow, as I think. I dont know why Oracle PL/SQL has not
 a
> bit operations kinda bit shift operations, it will be more faster. Or I'm
> not right about shift operation? In any case I didnt find them.

Unless you pretend make these computations thousands times in a short period of time, I think it is no performance problem, as I think there is not another solution, as pl/sql has no bit operators. One good solution would be user-exits, if you really need performance.

> I didnt see ORA_FFI package on server. Or, ORA_FFI should be
> moved to server too ?

You see, when you move a package into the server, it is lost in a dark world where it cannot see anything beyond the Oracle dominion (as far as I know).
As the ORA_FFI package accesses DLLs that are in the client machine, I can not be moved, even because it belongs to forms itself.

Hope I could help!

-- 
Luis Cabral
cabral_at_merconet.com.br
Received on Wed Dec 24 1997 - 00:00:00 CET

Original text of this message