Re: (Fwd) Re: Any Oracle 9 users? A test please...

From: "Dan Langille" <dan(at)langille(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: (Fwd) Re: Any Oracle 9 users? A test please...
Date: 2002-09-30 21:33:23
Message-ID: 3D988AE3.31947.8122636F@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mail(dot)e-perception(dot)com>
> > To: Dan Langille <dan(at)langille(dot)org>
> > Subject: Re: Any Oracle 9 users? A test please...
> > In-Reply-To: <3D985663(dot)24174(dot)80554E83(at)localhost>
> > Message-ID: <20020930114241(dot)E45374-100000(at)mail(dot)e-perception(dot)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(at)freebsd(dot)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(at)FreeBSD(dot)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(at)candle(dot)pha(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-09-30 21:37:47 Postgresql likes Tuesday...
Previous Message Tom Lane 2002-09-30 21:26:01 Re: [SQL] CURRENT_TIMESTAMP