Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Passing DATE to extproc in Oracle8

Passing DATE to extproc in Oracle8

From: Steve Baldwin <Steven.Baldwin_at_hancorp.com.au>
Date: Tue, 21 Jul 1998 16:31:50 +1000
Message-ID: <6p1ckm$3l2$1@news.mel.aone.net.au>


Hi there,

I am writing some external (i.e. C) functions, and things were going OK until I came across a requirement to pass a DATE as an argument. From looking in the PL/SQL UG&Ref (Ch. 10), I can't see how this is done, although it would appear to be a somewhat glaring omission if it cannot.

The reason it seems to be a strange omission is that not only is DATE a pretty fundamental Oracle data type, but also OCI supports dates very nicely, particularly with the new OCIDate structure.

One way I thought of doing it was to 'wrap' the external function with a PL/SQL function, passing the date as a string, but from what I can see there is no way to define the RESTRICT_REFERENCES pragma for the external function without defining it in the Package Spec (which I don't really want to do). If I don't do this, PL/SQL doesn't like any RR pragma for my wrapper - saying it violates the pragma, so I cannot call my wrapper function from SQL. If you have any clues could you please 'cc' your reply to my e-mail address.

Thanks very much.

Steve Baldwin
Steven.Baldwin_at_hancorp.com.au Received on Tue Jul 21 1998 - 01:31:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US