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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Mascari <mascarm@mascari.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Yury Bokhoncovich <byg@center-f1.ru>, Dan Langille <dan@langille.org>, Roland Roberts <roland@astrofoto.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2002-10-02T17:19:11Z
Lists: pgsql-hackers
Mike Mascari <mascarm@mascari.com> writes:
> SQL> CREATE PROCEDURE test
>    2  AS
>    3  BEGIN
>    4   INSERT INTO foo SELECT SYSDATE FROM dual;
>    5   dbms_lock.sleep(5);
>    6   INSERT INTO foo SELECT SYSDATE FROM dual;
>    7  END;
>    8  /

> Procedure created.

> SQL> execute test;

> PL/SQL procedure successfully completed.

> SQL> select to_char(a, 'HH24:MI:SS') from foo;

> TO_CHAR(
> --------
> 12:01:07
> 12:01:12


What fun.  So in reality, SYSDATE on Oracle behaves like timeofday():
true current time.  That's certainly not a spec-compliant interpretation
for CURRENT_TIMESTAMP :-(

Has anyone done the corresponding experiments on the other DBMSes to
identify exactly when they allow CURRENT_TIMESTAMP to advance?

			regards, tom lane