It is not clear to me;  is this its own transaction or a function call?

---------------------------------------------------------------------------

Dan Langille wrote:
> And just for another opinion, which supports the first.
> 
> >From now, unless you indicate otherwise, I'll only report tests which 
> have both values the same.
> 
> From: "Shawn O'Connor" <[EMAIL PROTECTED]>
> To: Dan Langille <[EMAIL PROTECTED]>
> Subject: Re: Any Oracle 9 users?  A test please...
> In-Reply-To: <3D985663.24174.80554E83@localhost>
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-PMFLAGS: 35127424 0 1 P2A7A0.CNM
> 
> Okay, here you are:
> ----------------------------------
> 
> DECLARE
>  time1 TIMESTAMP;
>  time2 TIMESTAMP;
>  sleeptime NUMBER;
> BEGIN
>  sleeptime := 5;
>  SELECT CURRENT_TIMESTAMP INTO time1 FROM DUAL;
>  DBMS_LOCK.SLEEP(sleeptime);
>  SELECT CURRENT_TIMESTAMP INTO time2 FROM DUAL;
>  DBMS_OUTPUT.PUT_LINE(TO_CHAR(time1));
>  DBMS_OUTPUT.PUT_LINE(TO_CHAR(time2));
> END;
> /
> 30-SEP-02 11.54.09.583576 AM
> 30-SEP-02 11.54.14.708333 AM
> 
> PL/SQL procedure successfully completed.
> 
> ----------------------------------
> 
> Hope this helps!
> 
>  -Shawn
> 
> 
> On Mon, 30 Sep 2002, Dan Langille wrote:
> 
> > We're testing this just to see what Oracle does.  What you are
> > saying is what we expect to happen.  But could you do that test for
> > us from the command line?  Thanks.
> >
> > On 30 Sep 2002 at 10:31, Shawn O'Connor wrote:
> >
> > > I'm assuming your doing this as some sort of anonymous
> > > PL/SQL function:
> > >
> > > Don't you need to do something like:
> > >
> > > SELECT CURRENT_TIMESTAMP FROM DUAL INTO somevariable?
> > >
> > > and to wait five seconds probably:
> > >
> > > EXECUTE DBMS_LOCK.SLEEP(5);
> > >
> > > But to answer your question-- When this PL/SQL function
> > > is run the values of current_timestamp are not the same, they will
> > > be sepearated by five seconds or so.
> > >
> > > Hope this helps!
> > >
> > >  -Shawn
> > >
> > > On Mon, 30 Sep 2002, Dan Langille wrote:
> > >
> > > > Followups to [EMAIL PROTECTED] please!
> > > >
> > > > Any Oracle 9 users out there?
> > > >
> > > > I need this run:
> > > >
> > > >         BEGIN;
> > > >         SELECT CURRENT_TIMESTAMP;
> > > >         -- wait 5 seconds
> > > >         SELECT CURRENT_TIMESTAMP;
> > > >
> > > > Are those two timestamps the same?
> > > >
> > > > Thanks
> > > > --
> > > > Dan Langille
> > > > I'm looking for a computer job:
> > > > http://www.freebsddiary.org/dan_langille.php
> > > >
> > > >
> > > > To Unsubscribe: send mail to [EMAIL PROTECTED]
> > > > with "unsubscribe freebsd-database" in the body of the message
> > > >
> > >
> > >
> >
> >
> > --
> > Dan Langille
> > I'm looking for a computer job:
> > http://www.freebsddiary.org/dan_langille.php
> >
> 
> 
> ------- End of forwarded message -------
> -- 
> Dan Langille
> I'm looking for a computer job:
> http://www.freebsddiary.org/dan_langille.php
> 
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to