Re: (Fwd) Re: Any Oracle 9 users? A test please... - Mailing list pgsql-hackers

From Dan Langille
Subject Re: (Fwd) Re: Any Oracle 9 users? A test please...
Date
Msg-id 3D988AE3.31947.8122636F@localhost
Whole thread Raw
In response to Re: (Fwd) Re: Any Oracle 9 users? A test please...  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
The original tester says "this is an anonymous procedure".

On 30 Sep 2002 at 15:07, Bruce Momjian wrote:

> 
> 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" <soconnor@mail.e-perception.com>
> > To: Dan Langille <dan@langille.org>
> > Subject: Re: Any Oracle 9 users?  A test please...
> > In-Reply-To: <3D985663.24174.80554E83@localhost>
> > Message-ID: <20020930114241.E45374-100000@mail.e-perception.com>
> > 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 freebsd-database@freebsd.org 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 majordomo@FreeBSD.org
> > > > > 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
>   pgman@candle.pha.pa.us               |  (610) 359-1001 +  If your
>   life is a hard drive,     |  13 Roberts Road +  Christ can be your
>   backup.        |  Newtown Square, Pennsylvania 19073
> 


-- 
Dan Langille
I'm looking for a computer job:
http://www.freebsddiary.org/dan_langille.php



pgsql-hackers by date:

Previous
From: "Alexey V. Borzov"
Date:
Subject: Re: [COMMITTERS] pgsql/contrib/rserv ApplySnapshot.in CleanLog. ...
Next
From: Tino Wildenhain
Date:
Subject: Re: [GENERAL] Anyone want to assist with the translation