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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PRAGMA errors

Re: PRAGMA errors

From: L120bj <l120bj_at_aol.com>
Date: 1998/02/01
Message-ID: <19980201110301.GAA25218@ladder03.news.aol.com>#1/1

>Subject: Re: PRAGMA errors
>From: Leslie_B_DreyerKalra <lbd_at_techiesinc.com>
>Date: 2/1/98 7:35AM GMT
>Message-id: <34D425A6.67FA_at_techiesinc.com>
>
>Leslie_B_DreyerKalra wrote:
>>
>> I'm defining a RESTRICT_REFERENCES pragma for a function that I'd like
>> to be able to use in a WHERE clause. The function returns a CHAR that is
>> basically a Boolean. Here's the line:
>>
>> PRAGMA RESTRICT_REFERENCES (check_all_cats, WNDS);
>>
>> When I try to compile this (in sqlplus), I get this error:
>>
>> PLS-00707: unsupported construct or internal error [2603]
>> PL/SQL: Compilation unit analysis terminated
>>
>I think I found this one myself (I wasn't making sure that all of the
>functions called by my function were also pure). Now I'm having another
>problem, though:
>
>I have a function that builds two dynamic SQL queries (both SELECTs --
>no UPDATEs, INSERTs or DELETEs), loads the results of one into a PL/SQL
>table, then compares the results of the second against the PL/SQL table.
>I define a simple WNDS pragma for this function (it really doesn't write
>to any database tables, nor does it call any other functions of mine),
>but I'm getting the "violates its associated pragma" message.
>
>It does call DBMS_SQL functions, and I can't vouch for their purity, and
>the EXISTS function for PL/SQL tables. If I take out the EXISTS
>function, it still violates, so EXISTS isn't the culprit. Other than
>that, it's self-contained. I can't see how it's violating its pragma!
>
>I *really* need to use this function in a WHERE clause, and I'm getting
>desperate. Does anyone have any idea how I can get this to work???????
>
>Oracle 7.3.3.3, Sparc Solaris 2.5.1, FYI...
>
>Thanks!
>>
>> --
>> Leslie Dreyer Kalra
>> Techies, Inc.
>> lbd_at_techiesinc.com
>
>--
>Leslie Dreyer Kalra
>Techies, Inc.
>lbd_at_techiesinc.com
>
>
>
>
>
>
>

I had a similar problem a couple of days ago. In my case it was that my top level function was calling another function which had the WNPS pragma associated with it. However, this second function was amending a package level PL/SQL table. Once I removed the WNPS it compiled fine. However, I think there is a furhter restriction in the packaged functions used in where clauses must also have the WNPS pragma associated with them, so you may still have a problem.

Hope this helps
  Rob Received on Sun Feb 01 1998 - 00:00:00 CST

Original text of this message

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