Re: call functions using dynamic sql in SELECT statement

From: Kevin P. Fleming <kfleming_at_access-laserpress.com>
Date: Wed, 19 Aug 1998 02:24:29 GMT
Message-ID: <xHqC1.486$435.2485041_at_news.rdc1.az.home.com>


Yes, because there's no way for Oracle to be sure you won't go ahead and write to the database anyway. When you give Oracle the RESTRICT_REFERENCES pragma, you're not telling it that the program _doesn't_ write to the database, you're telling it that it's not _supposed_ to write to the database. The PL/SQL compiler will still ensure that you don't actually do it, but with DBMS_SQL involved it can't be sure.

Dennis Lo wrote in message <6rdbml$8ib_at_netline.jpl.nasa.gov>...
>I have one situation and would appreciate if someone can shed some lights
on
>it.
>
>I tried to use some of the functions I wrote previously in my SELECT
>statement. These functions are mostly built with dynamic sql, the dbms_sql
>stuff. I declare the directive restrict_references(<function_name>, WNDS)
>after the function specification. But when I compile the package body, the
>following error message is returned:
>
> PLS-00452: Subprogram <function_name> violates its
> associated pragma
>
>Does it mean that functions built with dynamic sql will not be accessible
>in SELECT statement?
>
>Please help.
>
>
Received on Wed Aug 19 1998 - 04:24:29 CEST

Original text of this message