
OK, I just received this answer from an Oracle 9 tester.  It shows
CURRENT_TIMESTAMP changing during the transaction.  Thanks, Dan.

Dan, it wasn't clear if this was in a transaction or not.  Does Oracle
have autocommit off by default so you are always in a transaction?

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

Dan Langille wrote:
> A very quick answer:
> 
> ------- Forwarded message follows -------
> Date: Mon, 30 Sep 2002 13:03:51 -0400 (EDT)
> From: Agent Drek <drek@smashpow.net>
> To: "freebsd-database@freebsd.org" <freebsd-database@freebsd.org>
> Cc: "freebsd-chat@freebsd.org" <freebsd-chat@freebsd.org>
> Subject: Re: Any Oracle 9 users?  A test please...
> In-Reply-To: <3D984877.19685.801EEC30@localhost>
> Message-ID: <Pine.BSF.4.44.0209301303030.50384-
> 100000@bang.smashpow.net>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Sender: owner-freebsd-database@FreeBSD.ORG
> 
> On Mon, 30 Sep 2002, Dan Langille wrote:
> 
> > Date: Mon, 30 Sep 2002 12:49:59 -0400
> > From: Dan Langille <dan@langille.org>
> > Reply-To: "freebsd-database@freebsd.org"
> > <freebsd-database@freebsd.org> To: "freebsd-database@freebsd.org"
> > <freebsd-database@freebsd.org> Cc: "freebsd-chat@freebsd.org"
> > <freebsd-chat@freebsd.org> Subject: Any Oracle 9 users?  A test
> > please...
> >
> > 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
> >
> 
> Our DBA says:
> 
> <snip from irc>
> 
> <data> SQL> SELECT current_timestamp FROM DUAL;
> <data> CURRENT_TIMESTAMP
> <data>
> ----------------------------------------------------------------------
> 
> ----- <data> 30-SEP-02 01.06.42.660969 PM -04:00 <data> SQL> SELECT
> current_timestamp FROM DUAL; <data> CURRENT_TIMESTAMP <data>
> ----------------------------------------------------------------------
> 
> ----- <data> 30-SEP-02 01.06.48.837372 PM -04:00 <data> (you have to
> include 'from dual' for 'non-table' selects)
> 
> --
>    Derek Marshall
> 
> Smash and Pow Inc > 'digital plumber'
> http://www.smashpow.net
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-database" in the body of the message
> 
> ------- 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

Mon, 30 Sep 2002 13:17:00 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: (Fwd) Re: Any Oracle 9 users?  A test please...

Howdy All,

You have to explicitly commit transactions in oracle using SQL*Plus.
However, DUAL (eg. SELECT current_timestamp FROM DUAL;) is special in this
case.  It is a table in the sys schema, used for selecting constants,
pseudo-columns, etc.

I'm not sure if this helps but see:

http://download-east.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/queries2.htm#2054162http://download-east.oracle.com/otndoc/oracle9i/901_doc/server.901/a90125/queries2.htm#2054162

rob
'Oracle 9 tester' :P

On Mon, 30 Sep 2002, Bruce Momjian wrote:

>
> OK, I just received this answer from an Oracle 9 tester.  It shows
> CURRENT_TIMESTAMP changing during the transaction.  Thanks, Dan.
>
> Dan, it wasn't clear if this was in a transaction or not.  Does Oracle
> have autocommit off by default so you are always in a transaction?
>
> ---------------------------------------------------------------------------
>
> Dan Langille wrote:
> > A very quick answer:
> >
> > ------- Forwarded message follows -------
> > Date: Mon, 30 Sep 2002 13:03:51 -0400 (EDT)
> > From: Agent Drek <drek@smashpow.net>
> > To: "freebsd-database@freebsd.org" <freebsd-database@freebsd.org>
> > Cc: "freebsd-chat@freebsd.org" <freebsd-chat@freebsd.org>
> > Subject: Re: Any Oracle 9 users?  A test please...
> > In-Reply-To: <3D984877.19685.801EEC30@localhost>
> > Message-ID: <Pine.BSF.4.44.0209301303030.50384-
> > 100000@bang.smashpow.net>
> > MIME-Version: 1.0
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> > Sender: owner-freebsd-database@FreeBSD.ORG
> >
> > On Mon, 30 Sep 2002, Dan Langille wrote:
> >
> > > Date: Mon, 30 Sep 2002 12:49:59 -0400
> > > From: Dan Langille <dan@langille.org>
> > > Reply-To: "freebsd-database@freebsd.org"
> > > <freebsd-database@freebsd.org> To: "freebsd-database@freebsd.org"
> > > <freebsd-database@freebsd.org> Cc: "freebsd-chat@freebsd.org"
> > > <freebsd-chat@freebsd.org> Subject: Any Oracle 9 users?  A test
> > > please...
> > >
> > > 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
> > >
> >
> > Our DBA says:
> >
> > <snip from irc>
> >
> > <data> SQL> SELECT current_timestamp FROM DUAL;
> > <data> CURRENT_TIMESTAMP
> > <data>
> > ----------------------------------------------------------------------
> >
> > ----- <data> 30-SEP-02 01.06.42.660969 PM -04:00 <data> SQL> SELECT
> > current_timestamp FROM DUAL; <data> CURRENT_TIMESTAMP <data>
> > ----------------------------------------------------------------------
> >
> > ----- <data> 30-SEP-02 01.06.48.837372 PM -04:00 <data> (you have to
> > include 'from dual' for 'non-table' selects)
> >
> > --
> >    Derek Marshall
> >
> > Smash and Pow Inc > 'digital plumber'
> > http://www.smashpow.net
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-database" in the body of the message
> >
> > ------- 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
>
>


Mon, 30 Sep 2002 13:41:11 -0400 (EDT)
Rob Fullerton <robf@home.samurai.com>
Re: (Fwd) Re: Any Oracle 9 users?  A test please...