Re: C in stored procedures

From: Bruce Pihlamae <pihlab_at_cbr.hhcs.gov.au>
Date: 15 Jun 94 12:56:23 +1000
Message-ID: <1994Jun15.125623.1_at_cbr.hhcs.gov.au>


In article <2t9u0c$u3_at_lastactionhero.rs.itd.umich.edu>, kjs_at_umich.edu (Kent J. Siemers) writes:
> adam_at_pluto.logica.co.uk wrote:
> : I have some C routines that I want available as stored procedures.
> : Is this possible or do stopred procedures have to be in PL/SQL?
> : If the latter, is it possible to call C routines from a PL/SQL
> : procedure?

Oracle Corp call routines in the kernel from within some of their packaged procedures but as yet have not allowed/supported user sites adding OBJ files (callable routines) to the kernel. Maybe one day they will let us do it, but not yet. They also have the problem that if they start allowing 3rd party products to reside inside the kernel then these 3rd party products might compete with them and cause them to lose profits.  

> Why would you want to call C from a PL/SQL routine? The whole idea
> is to have a machine-independant, procedural language which can be
> compiled and the "executable" stored in the data dictionary.

How about generating random numbers efficiently, doing matrix multiplication, accessing non-Oracle files/dbms's, including your own basic 2-phase commit handler (and not having to buy Oracle's option), generating passwords, hook into O/S security, providing any functionality not included in PL/SQL ...

PL/SQL is fine for simple work with the database but even 'compiled' it is nowhere near as fast as a tight piece of C (or any other 3GL) code.

 --

Bruce... pihlab_at_cbr.hhcs.gov.au


  • Bruce Pihlamae -- Database Administration *
  • Commonwealth Department of Human Services and Health *
  • Canberra, ACT, Australia (W) 06-289-7056 * *=================================================================*
  • These are my own thoughts and opinions, few that I have. *

"The more complex the argument gets, the easier it is to refute." "Killing is wrong!" -- Trent 'The Uncatchable' Castanaveras Received on Wed Jun 15 1994 - 04:56:23 CEST

Original text of this message