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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: function in sql

RE: function in sql

From: Alex Hillman <alex_hillman_at_physia.com>
Date: Wed, 1 Nov 2000 10:33:45 -0500
Message-Id: <10667.120805@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C04419.212E0A00
Content-Type: text/plain;

        charset="iso-8859-1"

"DETERMINISTIC" meen that function result does not depend on session variables and database objects, but in PL/SQL functions used let say in select statements you can select from tables different from tables used in your select statement.

Alex Hillman

-----Original Message-----
From: Gogala, Mladen [mailto:MGogala_at_oxhp.com] Sent: Tuesday, October 31, 2000 4:37 PM
To: Multiple recipients of list ORACLE-L Subject: RE: function in sql

Pragma is just for packages. Format is pragma restrict_references(function, string, string,...)
like in "pragma restrict_references(myfunct, WNDS,WNPS)". The "myfunct" part has to be a part
of a package, otherwise, the pragma doesn't work. The only way to do so for the standalone
functions is to declare them to be "deterministic". That means exactly the same thing as the
pragma above and allows you to invoke the function so defined in a select list.
What is more, this particular pragma is being deprecated. The mighty and wise Oracle advises
us to use the new keyword or else....

-----Original Message-----
Sent: Tuesday, October 31, 2000 10:36 AM To: Multiple recipients of list ORACLE-L

Correct, you need to define a pragma to restrict references for standalone functions.

The initialization parameter is for query rewrite, and is for function based indexes.
Two different things entirely.
----- Original Message -----
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Sent: Tuesday, October 31, 2000 6:36 AM

> Hello,
> to use funktions in sql I would expect that I have to
> define a pragma restrict_reference.
>
> Some one told me that I have to set a init.ora-parameter
> to allow all functions to run in sql-statements
>
> Is this true ?
>
>
> Wolfgang Ludewig
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: wolfgang.ludewig_at_systor.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Tom Pall
  INET: tom_at_cdproc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gogala, Mladen
  INET: MGogala_at_oxhp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

------_=_NextPart_001_01C04419.212E0A00
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>RE: function in sql</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>&quot;DETERMINISTIC&quot; meen that function result =
does not depend on session variables and database objects, but in =
PL/SQL functions used let say in select statements you can select from =
tables different from tables used in your select statement.</FONT></P>

<P><FONT SIZE=3D2>Alex Hillman</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Gogala, Mladen [<A =
HREF=3D"mailto:MGogala_at_oxhp.com">mailto:MGogala_at_oxhp.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, October 31, 2000 4:37 PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: RE: function in sql</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Pragma is just for packages. Format is pragma =
restrict_references(function,</FONT>
<BR><FONT SIZE=3D2>string, string,...)</FONT>
<BR><FONT SIZE=3D2>like in &quot;pragma restrict_references(myfunct, =
WNDS,WNPS)&quot;.&nbsp; The &quot;myfunct&quot;</FONT>
<BR><FONT SIZE=3D2>part has to be a part</FONT>
<BR><FONT SIZE=3D2>of a package, otherwise, the pragma doesn't work. =
The only way to do so for</FONT>
<BR><FONT SIZE=3D2>the standalone</FONT>
<BR><FONT SIZE=3D2>functions is to declare them to be =
&quot;deterministic&quot;. That means exactly the</FONT>
<BR><FONT SIZE=3D2>same thing as the</FONT>
<BR><FONT SIZE=3D2>pragma above and allows you to invoke the function =
so defined in a select</FONT>
<BR><FONT SIZE=3D2>list.</FONT>
<BR><FONT SIZE=3D2>What is more, this particular pragma is being =
deprecated. The mighty and</FONT>
<BR><FONT SIZE=3D2>wise Oracle advises</FONT>
<BR><FONT SIZE=3D2>us to use the new keyword or else....</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, October 31, 2000 10:36 AM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Correct, you need to define a pragma to restrict =
references for standalone</FONT>
<BR><FONT SIZE=3D2>functions.</FONT>
</P>

<P><FONT SIZE=3D2>The initialization parameter is for query rewrite, =
and is for function based</FONT>
<BR><FONT SIZE=3D2>indexes.</FONT>
<BR><FONT SIZE=3D2>Two different things entirely.</FONT>
<BR><FONT SIZE=3D2>----- Original Message ----- </FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L =
&lt;ORACLE-L_at_fatcity.com&gt;</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, October 31, 2000 6:36 AM</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&gt; Hello,</FONT>
<BR><FONT SIZE=3D2>&gt; to use funktions in sql I would expect that I =
have to</FONT>
<BR><FONT SIZE=3D2>&gt; define a pragma restrict_reference.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Some one told me that I have to set a =
init.ora-parameter</FONT>
<BR><FONT SIZE=3D2>&gt; to allow all functions to run in =
sql-statements</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Is this true ?</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Wolfgang Ludewig</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; -- </FONT>
<BR><FONT SIZE=3D2>&gt; Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>&gt; -- </FONT>
<BR><FONT SIZE=3D2>&gt; Author: </FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp; INET: =
wolfgang.ludewig_at_systor.com</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Fat City Network Services&nbsp;&nbsp;&nbsp; -- =
(858) 538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>&gt; San Diego, California&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; -- Public Internet access / Mailing Lists</FONT>
<BR><FONT SIZE=3D2>&gt; =
--------------------------------------------------------------------</FO=
NT>
<BR><FONT SIZE=3D2>&gt; To REMOVE yourself from this mailing list, send =
an E-Mail message</FONT>
<BR><FONT SIZE=3D2>&gt; to: ListGuru_at_fatcity.com (note EXACT spelling =
of 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>&gt; the message BODY, include a line containing: =
UNSUB ORACLE-L</FONT>
<BR><FONT SIZE=3D2>&gt; (or the name of mailing list you want to be =
removed from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>&gt; also send the HELP command for other =
information (like subscribing).</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Tom Pall</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: tom_at_cdproc.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =
538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed =
from).&nbsp; You may</FONT>
<BR><FONT SIZE=3D2>also send the HELP command for other information =
(like subscribing).</FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A =
HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>
<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Gogala, Mladen</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: MGogala_at_oxhp.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =
538-5051&nbsp; FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an =
E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of =
'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB =
ORACLE-L</FONT>
Received on Wed Nov 01 2000 - 09:33:45 CST

Original text of this message

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