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

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

From
"Mario Weilguni"
Date:
Tom Lane wrote:
>
>
>Has anyone done the corresponding experiments on the other DBMSes to
>identify exactly when they allow CURRENT_TIMESTAMP to advance ?
>

This applies up to Oracle 8.1.6, maybe it helps:
According to a co-worker, Oracle advances the time in transactions:
select to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss') from dual;

TO_CHAR(SYSDATE,'DD
-------------------
03.10.2002 10:16:28

(wait ...)

SQL> r 1* select to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss') from dual

TO_CHAR(SYSDATE,'DD
-------------------
03.10.2002 10:17:41


It even advances within procedures/functions, example:
create or replace procedure foobar is   s1 varchar(2000);  s2 varchar(2000);begin  select to_char(sysdate, 'dd.mm.yyyy
hh24:mi:ss')into s1 from dual;  (... put long running query here ...)  select to_char(sysdate, 'dd.mm.yyyy hh24:mi:ss')
intos2 from dual;  dbms_output.put_line(s1);  dbms_output.put_line(s2);end;  
/

set serverout on
execute foobar;


Hope it helps.

Regards,Mario Weilguni